Forum Discussion
smp_86112
Sep 08, 2011Cirrostratus
Unsanitized URI breaks TCL
I have an iRule which relies on a switch statement:
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
(do stuff)
}
}
It appears that some requests result in the error in /var/log/ltm:
TCL error: secure_servlet - bad option "-♦░:┐¡π┼~┐R╟à₧}Üåî♫┬": must be -exact, -glob, -regexp, or -- while executing "switch -glob [HTTP::uri] {"
The URI string is different each time, but always some unprintable characters. I'm wondering
1) If the request caused the rule to abort
2) If so, is there way to sanitize the URI before executing the switch statement
3) Is there a better way to check the URI?
- hooleylistCirrostratusYou can avoid that TCL error by using two hyphens to terminate the switch flag:
- smp_86112CirrostratusGenius hoolio, thanks very much!
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