Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When removing ticket from request URI, beware of other query parameters #5

Open
kljensen opened this issue May 11, 2020 · 4 comments
Open
Assignees
Labels
help wanted Extra attention is needed

Comments

@kljensen
Copy link

kljensen commented May 11, 2020

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.)

@prigaux
Copy link
Member

prigaux commented May 11, 2020

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.

@prigaux prigaux added the help wanted Extra attention is needed label Sep 5, 2020
@bajins
Copy link

bajins commented Apr 17, 2021

ngx.var.host to ngx.var.http_host

@prigaux
Copy link
Member

prigaux commented May 3, 2021

ngx.var.host to ngx.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.

@kljensen
Copy link
Author

kljensen commented May 3, 2021

I still hope to send a PR. 😞. My life is opening up a bit so I'll get on it within the next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants