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 »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • 403 Error when trying to export contacts
Pages: [1]

Author Topic: 403 Error when trying to export contacts  (Read 2905 times)

eric121

  • Guest
403 Error when trying to export contacts
October 10, 2010, 12:38:56 am
Hey Folks,

I have (what was until very recently) a fully functioning installation of CiviCRM (Version 3.1, Drupal 6.15)

Now when I use the Advanced Search feature, select "Export Contacts", select the fields for export, then click Continue, I'm met with a big nasty "Error 403: Forbidden" error.

This is what my error log spits out:

[Sat Oct 09 23:29:12 2010] [error] [client **IP ADDRESS**] ModSecurity: Access denied with code 403 (phase 2). Pattern match "(< ?(?:script|about|applet|activex|chrome).*(?:script|about|applet|activex|chrome) ?>|> ?< ?(img ?src|a ?href) ?= ?(ht|f)tps?:/|" ?> ?<|" ?[a-z]+ ?<.*>|> ?"? ?(>|<)|< ?/?i?frame|\\%env)" at ARGS:_qf_Select_next. [file "/hsphere/shared/apache2/conf/modsecurity.d/10_asl_rules.conf"] [line "690"] [id "340147"] [rev "56"] [msg "Atomicorp.com - FREE UNSUPPORTED DELAYED FEED - WAF Rules: Generic XSS filter"] [data ".php?"] [severity "CRITICAL"] [hostname "**HOSTNAME**"] [uri "/extranet/index.php"] [unique_id "TLFBGEj5ScMAAHWlFhAAAAAA"]

So, I contacted my hosting company (shared hosting, unfortunately), who claimed they "posted a mod security exclude in order to fix this issue", which didn't fix the issue. This was what they also suggested:

"It appears that rule might be hit because the argument "_qf_Select_next" is empty. Filling it with some data may help this..." OK, well, I have no idea what they're talking about. I searched Google and this forum but found no similar issues or possible solutions.

Has anyone else experienced similar issues with modsecurity? Any suggestions for a possible solution?

Thanks in advance!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: 403 Error when trying to export contacts
October 10, 2010, 03:30:06 am
Export Contacts from Advanced Search worked before? If so, then I would posit that something on the server changed and you should ask your host if something did change recently.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: 403 Error when trying to export contacts
October 11, 2010, 07:33:47 am
Your hosting company is probably giving you a spurious reply. That rule in mod_security looks like a test for cross site scripting exploits. It's possible that there are such exploits in CiviCRM (even, probable), but the error message doesn't provide enough info to track it down. I can't find the string "qf_Select_next" in the civicrm code base or by googling.

In general - I don't think you want them running mod_security on your CiviCRM code, but they're probably a big hosting company desperately trying to reduce the amount of security holes in all the other software that's running on their system. If they are going to run it, they should be providing better information ...

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: 403 Error when trying to export contacts
August 18, 2012, 09:23:52 pm
having mod_security issues too - won't let me add contribution page or event.  trying to get it bypassed by my provider.  perhaps civicrm should try to register with Atomicorp.com.

Cyberflyer

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 2
  • It's a piece of cake, Ezra!!
    • North Star Community Foundation
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.34 / Commons 7.x-3.20
  • MySQL version: 5.5.13
  • PHP version: 5.4.38
Re: 403 Error when trying to export contacts
September 04, 2012, 01:46:43 pm
I have the same problem when trying to create a contribution page.

Here is the error after the first page of the process is filled out and submitted:

Code: [Select]

Tue Sep 04 14:04:32 2012] [error] [client 206.174.101.235] ModSecurity: Access denied with code 403 (phase 2). Pattern match "(< ?(?:(?:java|vb)?script|about|applet|activex|chrome) ?>|> ?< ?(img ?src|a ?href) ?= ?(ht|f)tps?:/|\\" ?> ?<|\\" ?[a-z]+ ?<.*>|> ?\\"? ?(>|<)|< ?/?i?frame|\\\\%env)" at ARGS:_qf_Settings_next. [file "/usr/local/apache/conf/modsec2_rules/10_asl_rules.conf"] [line "903"] [id "340147"] [rev "81"] [msg "Atomicorp.com - FREE UNSUPPORTED DELAYED FEED - WAF Rules: Generic XSS filter"] [data "666"] [severity "CRITICAL"] [hostname "test.nscfundalaska.org"] [uri "/civicrm/admin/contribute/add"] [unique_id "UEZe0NHsR0IAAFqpRh4AAAAp"]


AN hosting says they are willing to grant an exception on a case by case basis, but not for the whole code base.

I've seen odd Page Not Found errors in various places of the admin UI, so I am going to have to just bump into them one at a time and get an exception.  Am under a tight deadline to deploy.

Would love it if there was a point-source to this issue we could fix.
« Last Edit: September 04, 2012, 01:49:30 pm by Cyberflyer »

demeritcowboy

  • Ask me questions
  • ****
  • Posts: 570
  • Karma: 42
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, still evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1 / 5.5
  • PHP version: 5.3, usually on Windows
Re: 403 Error when trying to export contacts
September 04, 2012, 02:08:03 pm
You should be able to do it yourself in .htaccess. I ran into this with dreamhost once. Try one of the alternatives they suggest putting in .htaccess:
http://wiki.dreamhost.com/Mod_security#Alternative_to_Disabling_Extra_Web_Security

Cyberflyer

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 2
  • It's a piece of cake, Ezra!!
    • North Star Community Foundation
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.34 / Commons 7.x-3.20
  • MySQL version: 5.5.13
  • PHP version: 5.4.38
Re: 403 Error when trying to export contacts
September 04, 2012, 02:52:15 pm
Thanks for that.  Will try it.

I just finished a debug session with AN Hosting and they had to allow Mod_security to allow the following three error codes in order for the Create Contribution Page sequence to work:

340147
390709
340148

So hopefully that is a clue for those who follow.

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: 403 Error when trying to export contacts
October 19, 2012, 01:03:05 pm
these issues also prevented export of contacts. 

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: 403 Error when trying to export contacts
November 28, 2012, 08:42:08 pm
found the same error with contact import.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • 403 Error when trying to export contacts

This forum was archived on 2017-11-26.