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?