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] Allow basic auth in url when using UrlValidator.#11601

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
blaugueux wants to merge1 commit intosymfony:masterfromblaugueux:url-validator-basic-auth
Closed

[Validator] Allow basic auth in url when using UrlValidator.#11601

blaugueux wants to merge1 commit intosymfony:masterfromblaugueux:url-validator-basic-auth

Conversation

@blaugueux
Copy link
Contributor

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PR

Now an url with basic auth likehttp://username:password@symfony.com can be valid.

Copy link
Member

Choose a reason for hiding this comment

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

.+? is equivalent to.*

and anyway, this pattern is wrong. is too permissive here. For instance, you cannot have a@ in there (you have to urlencode it)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@stof Is this better([\pL\pN-]*):([\pL\pN-]*)@ ?

I'm not an expert in regex, but i need this to be fixed!

Copy link
Contributor

Choose a reason for hiding this comment

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

Should be(([\pL\pN-]+:)?([\pL\pN-]+)@)? then, as the first part is optional and at least the second should exists with the@ sign.

OK:user:pass@,user@ and empty.
WRONG:user:pass,@,:pass@,:pass

Hmm seems regex is failing need to take a look at this.

Ah never mind I forgot to click for the test 😳

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Thx@sstok for your help

Improve regex. Add tests.
@blaugueux
Copy link
ContributorAuthor

@stof do i need to fix something else ?

@stof
Copy link
Member

stof commentedAug 8, 2014

👍

@fabpot
Copy link
Member

👍

@fabpot
Copy link
Member

Thank you@blaugueux.

fabpot added a commit that referenced this pull requestAug 9, 2014
…r. (blaugueux)This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#11601).Discussion----------[Validator] Allow basic auth in url when using UrlValidator.| Q             | A| ------------- | ---| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        |Now an url with basic auth like ```http://username:password@symfony.com``` can be valid.Commits-------f1ea987 Allow basic auth in url. Improve regex. Add tests.
@fabpotfabpot closed thisAug 9, 2014
@blaugueuxblaugueux deleted the url-validator-basic-auth branchAugust 9, 2014 10:41
@blaugueux
Copy link
ContributorAuthor

Huge thanks for all your work@fabpot

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@blaugueux@stof@fabpot@sstok@romainneutron

[8]ページ先頭

©2009-2025 Movatter.jp