-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR for Password Hash RFC #191
Merged
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
c77f2c2
Base structure for passsword_create and password_make_salt
7e41980
Actually complete password_create()
6574028
Implement password_verify
f7097d9
Fix memory leak on branch
18d3bd9
Basic random generator added to make_salt
618f262
More error checking, and some cleaning up for password.c
41d7374
Implement openssl support for make_salt
ircmaxell 2d4b7cb
Refactor salt generation, rename password_create to password_hash
232da90
Implement php.ini setting password.bcrypt_cost
e505316
Add tests for password hashing
2b9591f
Update tests to check ini setting
5f44be0
Add tests and error checking for large salt requested values to preve…
0dd2f16
Fix formatting issues in password.c
ircmaxell 6bb3865
Refactor crypt to use an external working function
ircmaxell da3d8bf
Refactor password.c a bit, add different error checking
ircmaxell 9e18e57
Merge remote branch 'upstream/master' into hash_password
ircmaxell 9c1445c
More refactoring of crypt into php_crypt, and fixing memory allocation
ircmaxell f53112f
Update password.c to use safe_emalloc in sensitive places
ircmaxell 6cc3c65
Remove php.ini setting for default bcrypt cost
6943f2a
Some more refactoring, make algo no longer optional
886527d
Update signature info for changing algo to an ordinal
5160dc1
Implement password_needs_rehash() function
ircmaxell db86d54
Fix issue with int vs long parameter
ircmaxell ee7e799
Implement password_get_info() function
ircmaxell 9d3630b
Cleanup whitespace issues
ircmaxell 99b7956
Merge remote branch 'upstream/master' into hash_password
ircmaxell 707c907
Switch second parameter to password_make_salt to be a flag
ircmaxell e05413c
Remove password_make_salt() from the implementation
ircmaxell 824f1f4
Merge remote branch 'upstream/master' into hash_password
ircmaxell db41f9f
Refactoring to use size_t instead of int most places
ircmaxell e8b7f5b
Add tests for password_get_info and password_needs_rehash
ircmaxell e9a7bde
Switch test to using strict comparison for crypt fallback
ircmaxell ebe0bd5
Remove bcrypt_cost ini entry from declaration
ircmaxell 76f3295
Expose PASSWORD_BCRYPT_DEFAULT_COST constant and update test to use it
ircmaxell 3e383dc
Merge remote branch 'upstream/master' into hash_password
ircmaxell 7161c3d
Add news entry for password API
ircmaxell 7ec80e1
Fix incorrect arg info required param count for password_hash
ircmaxell 83cfff4
Switch to using an ENUM for algorithms instead of a constant
ircmaxell e034a46
A bunch of naming convention fixes. No functionality changes
ircmaxell 44c2624
Fix ucwords error casing
ircmaxell 6fd5ba5
Fix arg info for required params passed to needs_rehash
ircmaxell 8bd79d1
Refactor slightly to enable cleaner readability
ircmaxell 4a7d18c
Fix some double free issues, and more cleanup work
ircmaxell 25b2d36
Fix issue with possible memory leak
ircmaxell 1751d5f
Really fix leaks, add test cases to prove it...
ircmaxell 76e83f7
fix allocation and copy issue
ircmaxell 37b2207
Clean up unreported memory leak by switching to zval_ptr_dtor
ircmaxell 0bc9ca3
Refactor to using a stack based zval instead of dynamic allocation
ircmaxell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does that mean that my salt will change depending on the platform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's core
crypt()
code that exists right now (as of 5.3.0). The reason for the change here is that I refactored it into two functions so I could call the implementation from C.But now, the salt will not change (assuming that you're comment is ment for this line)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, alright. Never mind :)