Forum Discussion
sain014_80857
Nimbostratus
Aug 04, 2017iRule Error - 'Denying user - Redirecting Userid :' found
I'm seeing the below error in our LTM as below.
err tmm2[12408]: 01220001:3: TCL error: /Common/Fraud_iRule - can't read "name": no such variable while executing "switch -glob -- $name { ...
JG
Cumulonimbus
Aug 04, 2017You might want to put "scan" in a condition:
when HTTP_REQUEST {
if { [HTTP::method] == "POST" && [HTTP::path] contains "/bql" } {
if {[HTTP::header "Content-Length"] > 5242880} {
HTTP::collect 5242880
} else {
HTTP::collect [HTTP::header Content-Length]
}
log local0. "[HTTP::uri] Content Length is [HTTP::header Content-Length]"
}
}
when HTTP_REQUEST_DATA {
log local0. "[HTTP::uri]"
log local0. "[HTTP::payload]"
set parameters [HTTP::payload]
foreach parameter [split $parameters &] {
if { [scan $parameter {%[^=]=%s} name value] == 2 } {
switch -glob -- $name {
txtUserid {
set userid $value
}
txtTok* {
set deny_user 1
}
}
}
}
if { [info exists deny_user] } {
log local0. "Denying user - Redirecting Userid $userid to https://www.test.com/Log_On_Error.htm";
HTTP::redirect https://www.test.com/Log_On_Error.htm
} else {
HTTP::release
}
}
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