Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Validator] Url validator not validating hosts ending in a number#20102

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
gwkunze wants to merge2 commits intosymfony:2.7fromgwkunze:url-validator-bug

Conversation

@gwkunze
Copy link
Contributor

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?no (Should validate slightly more urls)
Deprecations?no
Tests pass?yes
Fixed ticketsNone that I could find
LicenseMIT
Doc PR

We ran into an issue where the URL validator wasn't validating URL that we got from a legitimate (intranet) URL. Afaict from skimming RFCs the URLhttp://myhost123/ is valid, however the current regular expression doesn't accept the last part of a hostname (in this case the entire hostname is the last part as there are no periods in the host).

I've fixed this by adding the numbers unicode character property to the regular expression, I'm not sure but symbol characters (\pS) might need to be added to the group as well.

ro0NL reacted with thumbs up emoji
@gwkunzegwkunze changed the title[Validator] Url validator[Validator] Url validator not validating hosts ending in a numberSep 30, 2016
@nicolas-grekas
Copy link
Member

👍

@fabpot
Copy link
Member

Thank you@gwkunze.

fabpot added a commit that referenced this pull requestOct 3, 2016
… number (gwkunze)This PR was squashed before being merged into the 2.7 branch (closes#20102).Discussion----------[Validator] Url validator not validating hosts ending in a number| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no (Should validate slightly more urls)| Deprecations? | no| Tests pass?   | yes| Fixed tickets | None that I could find| License       | MIT| Doc PR        |We ran into an issue where the URL validator wasn't validating URL that we got from a legitimate (intranet) URL. Afaict from skimming RFCs the URL `http://myhost123/` is valid, however the current regular expression doesn't accept the last part of a hostname (in this case the entire hostname is the last part as there are no periods in the host).I've fixed this by adding the numbers unicode character property to the regular expression, I'm not sure but symbol characters (`\pS`) might need to be added to the group as well.Commits-------934c434 [Validator] Url validator not validating hosts ending in a number
@fabpotfabpot closed thisOct 3, 2016
This was referencedOct 3, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@gwkunze@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp