When removing ticket from request URI, beware of other query parameters
I believe that the regular expression on this line would "eat" both the ticket parameter and all parameters that follow. e.g. a url like &ticket=foo and &ticket=foo&next=bar would have bar "eaten".
local function _uri_without_ticket()
return ngx.var.scheme .. "://" .. ngx.var.host .. ngx.re.sub(ngx.var.request_uri, "[?&]ticket=.*", "")
end
(I'm happy to submit a pull request proposing a fix.)
AFAIK CAS is always appending the ticket last, though the specification is not clear about this.
So not important IMO, but ok for a pull request.
ngx.var.host to ngx.var.http_host
ngx.var.hosttongx.var.http_host
can you confirm you suggest this change because your url has a specific port number? if that's the case, i suggest you open a specific issue.
I still hope to send a PR. 😞. My life is opening up a bit so I'll get on it within the next week.