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

URLs that use the same query string keys (like s) break the debugger #2006

Closed
cs19 opened this issue Jan 16, 2021 · 2 comments
Closed

URLs that use the same query string keys (like s) break the debugger #2006

cs19 opened this issue Jan 16, 2021 · 2 comments

Comments

@cs19
Copy link

cs19 commented Jan 16, 2021

This is a really tiny nit I'm able to workaround but any URL that has the same query string as the special debugger URLs will break the debugger.

For example, if I have a url like http://localhost:8000/?s=1 the debugger will no longer work since the secret is overridden.

Code to do this is currently here: https://github.com/pallets/werkzeug/blob/master/src/werkzeug/debug/__init__.py#L471

Relevant lines:

cmd = request.args.get("cmd")
arg = request.args.get("f")
secret = request.args.get("s")
traceback = self.tracebacks.get(request.args.get("tb", type=int))
frame = self.frames.get(request.args.get("frm", type=int))

Would be nice if maybe the QS vars were more unique, deferred to the second key in the MultiDict, etc.

Environment:

  • Python version: 3.9
  • Werkzeug version: 1.0.1
@davidism
Copy link
Member

Since this is all internal, it shouldn't matter if we rename things. Prefixing the keys with _wzd_ (to match the pin cookie name) is probably enough for now.

@davidism davidism added this to the 2.0.0 milestone Feb 12, 2021
@davidism
Copy link
Member

davidism commented Feb 12, 2021

I actually can't reproduce this. The debugger doesn't keep the existing query string when making requests. All HTML, JS, and CSS requests use relative URLs, or only the path part of the current URL, for both the jQuery version and the new vanilla JS version.

@davidism davidism removed this from the 2.0.0 milestone Feb 12, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants