Skip to content

Proxy path reconstructed from the full URL instead of captured by the route #1799

Description

@abkfenris

The re_path has no ^ anchor and doesn't capture the proxied path, which forces:

path = request.get_full_path().split("proxy/")[1]

That takes the wrong segment for any URL containing proxy/ twice. Capture (?P<path>.*) in the route and take it as a view argument — the SSRF guards below it (views.py:308-329) get easier to reason about when the input isn't reverse-engineered from the URL.

Sites: views.py:304, urls.py:22

(from #1780)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions