pallets-eco / pallets-eco/flask-debugtoolbar

Redirects incorrectly handled with subfolders.

Open
#85 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
978
Forks
151
PR merge metrics
No merged PRs in 30d

Description

There appears to be a problem with how the flask-debugtoolbar follows redirects, when the redirect goes into a subdirectory. For example, with the flask system I wrote to run the site for my webcomic:

I click the link http://localhost:5000/content/main/latest and it takes me to the redirect debug page as expected. Clicking the link to follow the redirect's destination should be http://localhost:5000/content/main/51 but it instead takes me to http://localhost:5000/content/main/content/main/52

I'll repeat those links one after another with the domain and port number chopped off, to better illustrate the difference:

Right Link: /content/main/51
Wrong Link: /content/main/content/main/51

With the wrong link, the /content/main subdirectory path is doubled, which in turn leads to a 404.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named in the issue. Reproduce the toolbar redirect from /content/main/latest and inspect how the follow-redirect destination is generated. Done means the link points to /content/main/51 rather than duplicating the subfolder, and following it does not produce a 404.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, javascript, python
Domain
devtools, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.