Yozzer
Nimbostratus
Mar 07, 2012XSS checks in irule
Hi
Can an irule check for special chars in a switch statement?
switch -glob [URI::decode [URI::query "?[HTTP::payload]" Param1]] {
"*<" {
set variable "xss"
}
"*>" {
set variable "xss"
}
"*)" {
set variable "xss"
}
"*%" {
set variable "xss"
}
And can i check another parameter using a switch statement after the first one (I only need to check 2)?
when HTTP_REQUEST_DATA {
switch -glob [URI::decode [URI::query "?[HTTP::payload]" Param1]] {
"<" {
set variable "xss"
}
">" {
set variable "xss"
}
")" {
set variable "xss"
}
"%" {
set variable "xss"
}
}
switch -glob [URI::decode [URI::query "?[HTTP::payload]" Param2]] {
"<" {
set variable "xss"
}
">" {
set variable "xss"
}
")" {
set variable "xss"
}
"%" {
set variable "xss"
}
}
Thanks