Forum Discussion
hooleylist
May 24, 2010Cirrostratus
string map can't recursively perform substitutions:
http://www.tcl.tk/man/tcl8.4/TclCmd/string.htmM34
string is only iterated over once, so earlier key replacements will have no affect for later key matches.
You could either loop string map while there aren't instances of // or you could use regsub to search for //+ and replace it with /. However, if you're trying to handle obfuscation techniques, there are many more to account for than multiple forward slashes. As you're whitelisting based on IP address, obfuscation attempts might not be so much of a concern though. See these recent posts for more examples:
irule based on ip and url
http://devcentral.f5.com/Forums/tabid/1082223/asg/50/showtab/groupforums/aff/5/aft/1171094/afv/topic/Default.aspx1171131
http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&tpage=1&view=topic&postid=3090031324
Aaron