christian.folini | 30 Jun 13:44
Favicon

Re: How to save value of a query string parameterthen use it in Phase 4?

Hey Stephen,

Looks like you are busy working on your project...

I'd implement it as follows:

SecRule ARGS:menu "^(.*)$" "phase:2,pass,setvar:tx.menu=%{MATCHED_VAR}"
SecRule TX:MENU "!@eq 700" "phase:4,deny"

But maybe I did not get your question correctly.

regs,

Christian

-----Ursprüngliche Nachricht-----
Von: mod-security-users-bounces <at> lists.sourceforge.net
[mailto:mod-security-users-bounces <at> lists.sourceforge.net] Im Auftrag von Stephen Craig Evans
Gesendet: Montag, 30. Juni 2008 12:20
An: mod-security-users <at> lists.sourceforge.net
Betreff: [mod-security-users] How to save value of a query string parameterthen use it in Phase 4?

Hi,

This might be easy but it's not clear to me how to do this from reading the reference manual (especially
'setvar' and MATCHED_VAR) and going through all of the rules files that I have at my disposal.

In Phase 2, I want to save the value of a get query string parameter, say "menu=700".

So the rule might start off as:
SecRule ARGS_GET:menu ...

and somehow I need to set a variable with the value 700.

Then in Phase 4 I want to access the value and invoke a rule if a match, otherwise bypass the rule SecRule  ??? 
"!@eq 700" "t:none,pass,skip:2"
SecRule RESPONSE_BODY "..."  "phase:4:..."

How can I do this?

Any help is appreciated.
Stephen

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
mod-security-users mailing list
mod-security-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-security-users

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

Gmane