Forum Discussion
jplopezy_118145
Nimbostratus
Nov 22, 2013IRULE: APP CRASH AFTER HTTP_RESPONSE WHEN DISPLAY VARIABLE
Dear, I have a problem with a irule.
The problem happens when http_request from which checks if a login is valid or invalid a variable that is in memory that was allocated from a HTTP_REQUEST_DATA ...
Christian_Baco1
Nimbostratus
Nov 22, 2013when RULE_INIT {
set static::conn_debug 0
}
when HTTP_REQUEST {
set login_request 0
set usuario "NO"
log local0. "Enter HTTP_REQUEST [HTTP::path]"
if { [HTTP::path] starts_with "/app" && [HTTP::method] eq "POST" } {
HTTP::header remove "Accept-Encoding"
if { [HTTP::version] eq "1.1" } {
if { [HTTP::header is_keepalive] } {
HTTP::header replace "Connection" "Keep-Alive"
}
HTTP::version "1.0"
}
if { [HTTP::header exists "Content-Length"] && [HTTP::header "Content-Length"] < 1048577 } {
set content_length [HTTP::header "Content-Length"]
} else {
set content_length 1048576
}
if { $content_length > 0 } {
HTTP::collect $content_length
}
set login_request 1
}
}
when HTTP_REQUEST_DATA {
log local0. "Enter HTTP_REQUEST_DATA [$login_request]"
if { $login_request == 1 } {
if { [URI::query "?[HTTP::payload]" exe] equals "exe" } {
set usuario [URI::query "?[HTTP::payload]" userne]
if { $::usuario != "" } {
if { [string tolower $usuario] equals "validuser" } {
log local0. "allow"
} elseif {[string tolower $usuario] starts_with "a" }{
TCP::close
log local0. "Block"
} else {
set login_request 0
}
}
HTTP::release
}
}
log local0. "Exit HTTP_REQUEST_DATA"
}
when HTTP_RESPONSE {
log local0. " here is the crash $usuario"
}
- Christian_Baco1Nov 22, 2013
Nimbostratus
Try this - Christian_Baco1Nov 22, 2013
Nimbostratus
and check you log /var/log/ltm @+
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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