Skip to content

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

Open
@kljensen

Description

@kljensen

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions