logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: mod_security....
Author
eschaefera



Joined: 06 Apr 2010
Posts: 5

PostPosted: Tue 06 Apr '10 3:27    Post subject: mod_security.... Reply with quote

I'll need to execute an .asp page with this code:
Response.AddHeader "Content-Type", "application/pdf"
Response.AddHeader "Content-Disposition", + method + ";filename=" + docname
Response.BinaryWrite(data)
Response.End()
%>

but the reverse proxy prevent the execution, problem with the "content-type"....say "access forbidden"

in my configuration I'll have this:
SecFilterSelective REQUEST_METHOD "!^(GET|HEAD)$" chain
SecFilterSelective HTTP_Content-Type "!(^application/x-www-form-urlencoded$|^multipart/form-data;)"


What i'll need to do to fix this..?

thanks.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 06 Apr '10 4:54    Post subject: Reply with quote

No guarantee

have you tried adding
|^application/pdf to the content types allowed?

SecFilterSelective HTTP_Content-Type "!(^application/x-www-form-urlencoded$|^multipart/form-data|^application/pdf;)"

These seem like input filters to me but I'm not very good with the rules.
If mod_security is stopping it, there should be something in the error log with the line number of the rule in the config file causing the problem.
Back to top
eschaefera



Joined: 06 Apr 2010
Posts: 5

PostPosted: Tue 06 Apr '10 6:31    Post subject: Reply with quote

I'll get this error now:

Mon Apr 05 23:28:12 2010] [error] [client 192.168.1.72] mod_security: Access denied with code 403. Pattern match "!(^application/x-www-form-urlencoded$|^multipart/form-data;|^application/pdf;)" at HEADER("Content-Type") [hostname "apache.isocraft.com"] [uri "/cal/create.asp?name=retiro.pdf&method=attachment"]
Back to top
eschaefera



Joined: 06 Apr 2010
Posts: 5

PostPosted: Tue 06 Apr '10 6:52    Post subject: Reply with quote

I'll see.... the problem is the reverse stop this:

"/cal/create.asp?name=retiro.pdf&method=attachment"

What would I need to add on my configuration so that "mod_security" permits to execute the .asp pages with this arguments.

thanks in advance.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 06 Apr '10 7:37    Post subject: Reply with quote

my line:
SecFilterSelective HTTP_Content-Type "!(^application/x-www-form-urlencoded$|^multipart/form-data|^application/pdf;)"

your line:

SecFilterSelective HTTP_Content-Type "!(^application/x-www-form-urlencoded$|^multipart/form-data;|^application/pdf;)"

notice the red semi-colon
Back to top
eschaefera



Joined: 06 Apr 2010
Posts: 5

PostPosted: Tue 06 Apr '10 8:21    Post subject: Reply with quote

ok..sorry.. i'll fix it; still the same problem

[Tue Apr 06 01:16:53 2010] [error] [client 192.168.1.72] mod_security: Access denied with code 403. Pattern match "!(^application/x-www-form-urlencoded$|^multipart/form-data|^application/pdf;)" at HEADER("Content-Type") [hostname "apache.isocraft.com"] [uri "/cal/create.asp?name=retiro.pdf&method=attachment"]
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 06 Apr '10 11:11    Post subject: Reply with quote

Well, it was a guess. I have to concede this since I do not understand the rules enough.

I'd suggest you subscribe to the users mailing list. If anyone can figure out you problem they should be able to..
https://lists.sourceforge.net/lists/listinfo/mod-security-users
Back to top
eschaefera



Joined: 06 Apr 2010
Posts: 5

PostPosted: Wed 07 Apr '10 16:36    Post subject: Reply with quote

ok..thanks for you help
Back to top


Reply to topic   Topic: mod_security.... View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules