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

[Security] validate empty passwords again#23507

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

Merged
fabpot merged 1 commit intosymfony:2.7fromxabbuh:pr-23341
Jul 17, 2017
Merged

Conversation

@xabbuh
Copy link
Member

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#23341 (comment)
LicenseMIT
Doc PR

It looks like this part of#23341 causes serious security issues for some users who rely on the validator to also compare the empty string with their user's password (see for example#23341 (comment)). Thus I suggest to revert this part of#23341.

@szymach
Copy link

szymach commentedJul 14, 2017
edited
Loading

But this can cause a warning in sf2.8+ and break your app if you provide an empty string. If this needs to work as previously, why not simply change this to:

if (null ===$password ||'' ===$password) {// add violation that the password cannot be emptyreturn;}

That way there is no exception and no security issue.

@sstok
Copy link
Contributor

sstok commentedJul 15, 2017
edited
Loading

That way there is no exception and no security issue.

WAT 😐 this means that when you provide an empty string it's considered valid, which is not the case at all. When you use this constraint you want to check if the provided password matches the current one. Leaving this empty means the user is bypassing security!

If you want to make this optional use validation-groups.

@szymach
Copy link

szymach commentedJul 15, 2017
edited
Loading

@sstok I am not sure we both understand each other, but my proposition is to automatically put a constraint violation if the password is empty. In newer implementations of the password checker, anull value raises a warning and thus breaks the app, hence why ignoring empty passwords was done in the first place.

EDIT To clarify - initially the PR simply removed theif statement, so it would not work properly still. It has been changed since then and all is OK now.

@nicolas-grekasnicolas-grekas added this to the2.7 milestoneJul 17, 2017
@fabpot
Copy link
Member

Thank you@xabbuh.

@fabpotfabpot merged commit878198c intosymfony:2.7Jul 17, 2017
fabpot added a commit that referenced this pull requestJul 17, 2017
This PR was merged into the 2.7 branch.Discussion----------[Security] validate empty passwords again| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#23341 (comment)| License       | MIT| Doc PR        |It looks like this part of#23341 causes serious security issues for some users who rely on the validator to also compare the empty string with their user's password (see for example#23341 (comment)). Thus I suggest to revert this part of#23341.Commits-------878198c [Security] validate empty passwords again
@xabbuhxabbuh deleted the pr-23341 branchJuly 17, 2017 11:09
This was referencedJul 17, 2017
@Tobion
Copy link
Contributor

In theory, wasn't an empty password'' potentially valid before? Now it's never valid. Looks like a BC break to me.

@sstok
Copy link
Contributor

@Tobion I agree this is a BC break, but for security reasons this is more logical.

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

Reviewers

@fabpotfabpotfabpot approved these changes

+2 more reviewers

@sstoksstoksstok approved these changes

@szymachszymachszymach approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

2.7

Development

Successfully merging this pull request may close these issues.

7 participants

@xabbuh@szymach@sstok@fabpot@Tobion@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp