CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Activity processor fails on Registration Confirmation emails (potential attack)
Pages: [1]

Author Topic: Activity processor fails on Registration Confirmation emails (potential attack)  (Read 4018 times)

lsmithgo

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
    • Soirees at Breinton
  • CiviCRM version: 4.5 beta 7
  • CMS version: Joomla 3.3.3
  • MySQL version: MySQLi 5.5.37-percona-sure1-log
  • PHP version: PHP 5.3.28
Activity processor fails on Registration Confirmation emails (potential attack)
August 05, 2013, 08:45:09 am
I have slightly modified the Registration Confirmation (online) mail template to include a small HTML <table> and a <img> tag pointing at a graphic on my webserver.

The Registration Confirmation emails are also configured to bcc to an email address which is then picked for inbound email processing and loaded into CiviCRM as Activities by the Activity Processor scheduled job.

All been fine for a few years until I upgraded from 4.1 to 4.3.5 this weekend...

Now the Registration Confirmation emails do not get imported when the cron job runs with this message:

Failed Processing: Registration Confirmation - <Event name snipped>
Reason: Illegal characters in input (potential scripting attack)


Any advice on how to avoid this?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Activity processor fails on Registration Confirmation emails (potential attack)
August 05, 2013, 11:26:32 am
This message comes from the IDS library (Intrusion Detection). If you haven't already done this, the first thing I'd try is to delete the cached version of the settings file for IDS: <drupal-root>/sites/default/files/civicrm/ConfigAndLog/Config.IDS.ini (it will get rebuilt). If that's not working then you can either:

*  disable IDS by uncommenting or adding this line to your civicrm.settings.php file: define( 'CIVICRM_IDS_ENABLE', 1);
(NOTE that this may open your site to scripting attacks)

* add the field that's kicking the warning to the exceptions array in CRM/Core/IDS.php createConfigFile()
Protect your investment in CiviCRM by  becoming a Member!

lsmithgo

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
    • Soirees at Breinton
  • CiviCRM version: 4.5 beta 7
  • CMS version: Joomla 3.3.3
  • MySQL version: MySQLi 5.5.37-percona-sure1-log
  • PHP version: PHP 5.3.28
Re: Activity processor fails on Registration Confirmation emails (potential attack)
August 06, 2013, 02:33:52 pm
Thanks.  I'm using Joomla so the .ini file was here:
<root>/media/civicrm/ConfigAndLog

Deleting that didn't cure the problem.

What can be added as a "field" in the exceptions array?  How can I find out what is causing the exception?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Activity processor fails on Registration Confirmation emails (potential attack)
August 06, 2013, 05:57:23 pm
Try doing a view source on 'edit message template', and check the name / id of the form field that you've put the table in.
Protect your investment in CiviCRM by  becoming a Member!

lsmithgo

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
    • Soirees at Breinton
  • CiviCRM version: 4.5 beta 7
  • CMS version: Joomla 3.3.3
  • MySQL version: MySQLi 5.5.37-percona-sure1-log
  • PHP version: PHP 5.3.28
Re: Activity processor fails on Registration Confirmation emails (potential attack)
August 08, 2013, 01:22:25 am
Thanks.  I'm struggling with what you mean by "name / id of the form field".

I put an addition <TABLE> with style and a <img> reference after this:

<!-- BEGIN HEADER -->
  <!-- You can add table row(s) here with logo or other header elements -->
 <table width="500" border="0" cellpadding="0" cellspacing="0" id="crm-event_receipt" style="font-family: Arial, Verdana, sans-serif; text-align: left;">

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Activity processor fails on Registration Confirmation emails (potential attack)
August 08, 2013, 02:15:26 pm
Ditch that, the field which contains the HTML for a message template is 'msg_html' and it's already in the exceptions list. Maybe back up a bit and explain the process that's generating the error. Registration confirmations are generally sent when a user registers or is registered. But you referenced a cron job. What cron job are you running?

Beyond that I would confirm that things run ok w/o the added HTML snippet and then start  adding stuff back in, and check that the HTML is properly formed (i.e. no extra quotes, end tags where they should be etc.).


Also try disabling IDS checking temporarily to confirm that as a workaround and confirm what's happening. AND you can try increasing the warn and kick levels (near top of IDS.php file). This isn't a great permanent solution because I'm not sure you can have a custom copy of this php file - and if not you'd have to change it again for each upgrade.



Protect your investment in CiviCRM by  becoming a Member!

lsmithgo

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
    • Soirees at Breinton
  • CiviCRM version: 4.5 beta 7
  • CMS version: Joomla 3.3.3
  • MySQL version: MySQLi 5.5.37-percona-sure1-log
  • PHP version: PHP 5.3.28
Re: Activity processor fails on Registration Confirmation emails (potential attack)
August 09, 2013, 04:11:57 am
Yes, the registration confirmations are generated when a user registers.  They are also bcc'd to an email address which is picked up by the Activity Processor (running as a scheduled job by cron) which loads the emails back into CiviCRM.

Now you could argue that this is unnecessary....   but there's something in the HTML I've added which is causing IDS to barf.

I will try the steps below and revert.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Activity processor fails on Registration Confirmation emails (potential attack)

This forum was archived on 2017-11-26.