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 CiviMail (Moderator: Piotr Szotkowski) »
  • Seemingly random character sequence in message body causes CiviMail to fail
Pages: [1]

Author Topic: Seemingly random character sequence in message body causes CiviMail to fail  (Read 3054 times)

nkinkade

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 5
Seemingly random character sequence in message body causes CiviMail to fail
December 04, 2009, 04:23:33 pm
v2.2.7

This is a very bizarre problem, and I'm not even 100% convinced that it's caused by CiviCRM.  However, it's likely that it is, so I wanted to post in here just in case anyone had even the slightest clue what the source of this problem might be.

We are using CiviMail to send out a newsletter.  When trying to add our message body at step #3 (text email), every time we would click Next>> we would get nothing but a blank page.  I finally nominally tracked it down to a precise bit of text in the middle of the message:

"Ecoinformatics - Maximizing your data:  What can informatics do for you?"

I found that if you removed the colon after the word "data" that it worked fine.  Likewise, putting a space between the word and the colon ("data :") also fixed it.  Or moving the colon to follow the word "your".

However, that one string is not precisely the problem, as it CiviMail accepts the entire paragraph that that string is a part of.  Apparently some parser between my browser and CiviCRM is interpreting some sequence of characters in the full text as control characters and triggering and error condition.  It just so happens that removing the colon or putting a space before it somehow doesn't trigger the error.

I'm fairly certain that it's not reaching ./CRM/Mailing/Form/Upload.php, which it normally would.  If anyone is interested, the entire message text we were trying to use is attached.

Any clues?

Aloha,

Nathan

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Seemingly random character sequence in message body causes CiviMail to fail
December 06, 2009, 11:47:33 pm
Nathan,

Are you able to replicate this problem on http://drupal.demo.civicrm.org.

Kurund
Found this reply helpful? Support CiviCRM

nkinkade

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 5
Re: Seemingly random character sequence in message body causes CiviMail to fail
December 07, 2009, 10:18:56 am
Hi Kurund,

Yes, it fails on the demo site as well.  Go here:

http://drupal.demo.civicrm.org/civicrm/mailing/send?mid=31&continue=true&reset=1

On step 3, expand the Plain-text Format textarea, scroll down a little more than halfway down to the text:

"Ecoinformatics - Maximizing your data :  What can informatics do for you?"

Remove the space between the word "data" and the colon, then click Next>>.  You'll just get a blank screen and will have to hit the Back button.  Hopefully you'll be able to get to the bottom of this.

Thanks!

Nathan

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Seemingly random character sequence in message body causes CiviMail to fail
December 08, 2009, 05:42:26 am
Nathan:

You get this error (blank page) because of IDS. You will have to add below patch to escape "text_message" field

Quote
Index: CRM/Core/IDS.php
===================================================================
--- CRM/Core/IDS.php   (revision 25440)
+++ CRM/Core/IDS.php   (working copy)
@@ -92,6 +92,7 @@
     exceptions[]        = __utmc
     exceptions[]        = widget_code
     exceptions[]        = html_message
+   exceptions[]        = text_message
     exceptions[]        = body_html
     exceptions[]        = msg_html
     html[]              = description

Kurund
Found this reply helpful? Support CiviCRM

nkinkade

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 5
Re: Seemingly random character sequence in message body causes CiviMail to fail
December 08, 2009, 07:13:45 am
Kurund,

Are you considering that expected behavior, or a bug?  What exactly is this "IDS" trying to protect against?

If it is expected behavior, then some outcome other than a blank screen would be ultra helpful.   I consider a white screen with no message to be a bug, even if what caused it is expected.   The system should kick the user back to step #3 with an error message.  Is someone going to file a bug and patch for this?

Thanks!

Nathan

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Seemingly random character sequence in message body causes CiviMail to fail
December 08, 2009, 07:54:44 am

nathan:

check:

http://php-ids.org/

for more details on the IDS

the white screen was most likely due to PHP core dumping. so not sure if we can really do anything about it

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

nkinkade

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 5
Re: Seemingly random character sequence in message body causes CiviMail to fail
December 08, 2009, 08:06:40 am
Thanks, Lobo.

What's the method again of getting Drupal/CiviCRM to dump PHP errors to the screen?  The other day I suspected that some PHP errors were being suppressed, but I was unsuccessful in getting them to display.  I tried configuring Drupal's settings.php to display errors, but that didn't seem to do it.  I feel like I'm missing something obvious here, so I apologize if how to make this happen is documented in a 1,000 different places.

I'd like to look at the PHP errors so that I can understand why this IDS system would cause uncatchable PHP errors instead of catchable ones that can dealt with.  Or is that just how the IDS works?  By throwing an uncatchable error and just dying?

Thanks for your help.

nkinkade

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 5
Re: Seemingly random character sequence in message body causes CiviMail to fail
December 08, 2009, 08:21:34 am
Just to follow up on and close this thread, I chatted with Lobo on irc.freenode.net#civicrm and this is either a bug with http://php-ids.org/ or perhaps even a PHP bug being triggered by the IDS.  Since this is not likely to happen again, it's probably not worth my time to pursue this upstream, and it could get very time consuming for little if any gain.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Seemingly random character sequence in message body causes CiviMail to fail

This forum was archived on 2017-11-26.