17-Jul-2020 03:01
Hi everyone,
Trying to understand what might be the issue with replacing content with regsub, getting following error :
<HTTP_REQUEST> - ERR_ARG (line 2) invoked from within "HTTP::uri [regsub "/3dnotification" [HTTP::uri] ""] "
I might replace the regsub with other operand doing the same operation.
The iRule code is the following :
if { not ( [string tolower [HTTP::uri]] starts_with "/socket.io" )} then {
HTTP::uri [regsub "/3dnotification" [HTTP::uri] ""]
# need to strip trailing slash on URI otherwise results in 404 for resources...
HTTP::uri [regsub "\/$" [HTTP::uri] ""]
} elseif { [string tolower [HTTP::header Upgrade]] contains "websocket" } {
ONECONNECT::reuse disable
set oc_reuse_disable 1
}
HTTP::header replace "X-Forwarded-ContextPath" "/"
}
17-Jul-2020 09:12
Hello Livius.
Does the error raise on each query or just with some of them?
I'm suppecting that some specific URI structure could cause this issue.
Take into account that someone could create some crafted URI that could cause some kind of injection (intencionally or not).
Could you give us some feedback of which specific URI could cause the issue and which one not?
Regards,
Dario.