Skip to content

unify path validation - #6840

Open
SteffenDE wants to merge 2 commits into
mainfrom
sd-unify-path-validation
Open

unify path validation#6840
SteffenDE wants to merge 2 commits into
mainfrom
sd-unify-path-validation

Conversation

@SteffenDE

Copy link
Copy Markdown
Member

No description provided.

Comment thread lib/phoenix/url.ex
# the only remaining parser-stripped character is the tab, so a leading `/`
# can only reach a second `/` through tabs and `"/\t"` is enough to catch it.
# Listing them positionally would allow `"/\n\t/example.com"`.
@invalid_local_url_chars ["\\", "/%09", "/\t", "\n", "\r"]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same list we use in LiveView now

https://github.com/phoenixframework/phoenix_live_view/blob/7f06d34002983f30f44ef24827362a32360a736c/lib/phoenix_live_view.ex#L1251

If we made Phoenix.URL public, we could reuse when LiveView requires 1.9.

@SteffenDE
SteffenDE requested a review from josevalim September 11, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants