?
avatar chconnor
chconnor
19 Oct 2016

Steps to reproduce the issue

Contacts -> Single Contact, Mail Options -> "Send Copy to Submitter" set to "Hide", but the checkbox shows anyway, and mail is allowed to be sent anyway

Expected result

  • No checkbox should be shown
  • if set to "hide", no email should be sent even if the checkbox was shown and used
  • if set to "hide", no email should be sent even if malicious actor submitted with the checkbox parameter present

Actual result

Checkbox is shown, email is sent

System information (as much as possible)

Joomla 3.6.3

Additional comments

I notice in components/com_contact/views/contact/tmpl it does:

<?php if ($field->name === 'contact_email_copy' && !$this->params->get('show_email_copy')) : ?>
<?php continue; ?>

...but if I echo $field->name it shows as "jform[contact_email_copy]". Just wanting to make the checkbox go away, I changed this to:

<?php if ($field->name === 'jform[contact_email_copy]') : ?>
<?php continue; ?>

...and that worked. I also commented out the final section in components/com_contact/controllers/contact.php to prevent mailing a message in any circumstances.

Spammers have been using this form as an open relay.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar chconnor chconnor - open - 19 Oct 2016
avatar brianteeman
brianteeman - comment - 20 Oct 2016

Are you using one of the default templates or your own template with an override as I cannot replicate this in the core.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12480.

avatar brianteeman brianteeman - change - 20 Oct 2016
Status New Information Required
avatar chconnor
chconnor - comment - 20 Oct 2016

Sorry - I am using a template. I came to the erroneous assumption that the code I was 'fixing' couldn't be affected by a template, so given my mistake and your testing, you can probably close this bug.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12480.

avatar brianteeman
brianteeman - comment - 20 Oct 2016

Closed as this iw not an issue with Joomla but once again a badly coded tempalte

avatar brianteeman brianteeman - change - 20 Oct 2016
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2016-10-20 19:11:23
Closed_By brianteeman
avatar brianteeman brianteeman - close - 20 Oct 2016

Add a Comment

Login with GitHub to post a comment