Forum Discussion
Dietmar_Moltner
Nimbostratus
Feb 23, 2015TCL error on iRule-based logout logic
Dear all,
I am facing a very strange exception in one our iRules which is dealing with generic logout on our virtuals
The iRule:
when RULE_INIT {
set static::LOGOUT_URI "/logo...
StephanManthey
Nacreous
Feb 24, 2015Hi Dietmar,
I´m not sure, what this line is good for as it will be a single value only:foreach excludeCookieName $static::LOGOUT_COOKIE_EXCLUDE {
Removed the section:
when RULE_INIT {
set static::LOGOUT_URI "/logout"
set static::LOGOUT_COOKIE_EXCLUDE {"BIGip_SSO_"}
}
when HTTP_REQUEST {
if {[HTTP::uri] starts_with $static::LOGOUT_URI} {
set cookieResponse "Connection Close "
Iterate over all cookies
foreach cookieName [HTTP::cookie names] {
if { $cookieName ne $static::LOGOUT_COOKIE_EXCLUDE } {
if { [HTTP::cookie $cookieName] ne "" } {
set cookieResponse "$cookieResponse\"Set-Cookie\" \"[call /Common/RBUTIL::get_expired_cookiestring $cookieName]\" "
set cookieResponse "$cookieResponse\"Set-Cookie\" \"[call /Common/RBUTIL::get_expired_cookiestring $cookieName [HTTP::host] 0]\" "
set cookieResponse "$cookieResponse\"Set-Cookie\" \"[call /Common/RBUTIL::get_expired_cookiestring $cookieName 0 0]\" "
set cookieResponse "$cookieResponse\"Set-Cookie\" \"[call /Common/RBUTIL::get_expired_cookiestring $cookieName 0]\" "
}
}
}
if { $debugLevel > 1} { log local0.debug "$logPrefix Cookie logout sequence: $cookieResponse" }
eval HTTP::respond 200 $cookieResponse
unset cookieResponse
return
}
}
Perhaps a slightly reduced version solves the issue?
Thanks, StephanHelp 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
