Forum Discussion
Karin_G__49208
Nimbostratus
Feb 09, 2006How do I use ' (Single Quote Character) in script?
I 'd like to block input with ' (Single Quote)
but script can't detect this character.
So If who can solve this problem pls help me.
when HTTP_REQUEST {
if { [HTTP::uri] contains "'" }
{ Discard }
}
Thanks
- The only problem I can see with your code is that there is no command "Discard". When I try to load your rule I get an error stating invalid command.
when HTTP_REQUEST { if { [HTTP::uri] contains "'" } { log local0. "found quote in URI" reject } }
when HTTP_REQUEST { if { [HTTP::uri] contains {'} } { log local0. "found quote in URI" reject } }
when HTTP_REQUEST { loop until URI is fully decoded set tmpUri [HTTP::uri] set uri [URI::decode $tmpUri] while { $uri ne $tmpUri } { set tmpUri $uri set uri [URI::decode $tmpUri] } if { $uri contains "'" } { log local0. "found quote in URI" reject } }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects