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

Extend Argon2i support check to account for sodium_compat#25412

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
chalasr merged 1 commit intosymfony:3.4frommbabker:3.4-argon-check
Dec 10, 2017
Merged

Extend Argon2i support check to account for sodium_compat#25412

chalasr merged 1 commit intosymfony:3.4frommbabker:3.4-argon-check
Dec 10, 2017

Conversation

@mbabker
Copy link
Contributor

@mbabkermbabker commentedDec 9, 2017
edited
Loading

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsN/A
LicenseMIT
Doc PRN/A

In the Argon2i password encoder, if in an environment wheresodium_compat is installed without either natively running PHP 7.2 or the (lib)sodium extension, theisSupported check can return true because the library exposes thesodium_crypto_pwhash_str() function however a pure PHP implementation of the method is not implemented, so the library does not actually support the hashes.

paragonie/sodium_compat#55 requested a way to check support through the polyfill to avoid this condition and the 1.4 release added it. This PR extends the encoder'sisSupported check to be aware of thesodium_compat library and use its support check if able to avoid misreporting thatsodium_crypto_pwhash_str() is available for use when it isn't.

returntrue;
}

if (\class_exists('\\ParagonIE_Sodium_Compat') &&\method_exists('\\ParagonIE_Sodium_Compat','crypto_pwhash_is_available')) {

Choose a reason for hiding this comment

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

you can remove the\\ in the strings

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Done

@chalasr
Copy link
Member

Thanks for fixing this bug@mbabker.

@chalasrchalasr merged commit95c1fc8 intosymfony:3.4Dec 10, 2017
chalasr pushed a commit that referenced this pull requestDec 10, 2017
…(mbabker)This PR was merged into the 3.4 branch.Discussion----------Extend Argon2i support check to account for sodium_compat| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | N/A| License       | MIT| Doc PR        | N/AIn the Argon2i password encoder, if in an environment where `sodium_compat` is installed without either natively running PHP 7.2 or the (lib)sodium extension, the `isSupported` check can return true because the library exposes the `sodium_crypto_pwhash_str()` function however a pure PHP implementation of the method is not implemented, so the library does not actually support the hashes.paragonie/sodium_compat#55 requested a way to check support through the polyfill to avoid this condition and the 1.4 release added it.  This PR extends the encoder's `isSupported` check to be aware of the `sodium_compat` library and use its support check if able to avoid misreporting that `sodium_crypto_pwhash_str()` is available for use when it isn't.Commits-------95c1fc8 Extend Argon2i support check to account for sodium_compat
@mbabkermbabker deleted the 3.4-argon-check branchDecember 10, 2017 20:44
This was referencedDec 15, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

4 participants

@mbabker@chalasr@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp