-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Refactor] Passwort Hash/Set #14282
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
[Refactor] Passwort Hash/Set #14282
Conversation
6543
commented
Jan 7, 2021
•
edited
Loading
edited
- Rename HashPassword() to SetPassword
- Generate new Salt on password set
- Drop Passwords witch are Valid with "" string and use empty passwd field for IsPasswordSet() func
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.
This doesn't appear to
You'll need to check every call to CreateUser and ensure that an empty password cannot be set - for example this code at present will set "" as the password for external users and makes it impossible to detect if a user is an external user through ispasswordset |
@zeripath why not use the SetPasswort function to check this ☝️ :) |
Codecov Report
@@ Coverage Diff @@
## master #14282 +/- ##
==========================================
- Coverage 41.81% 41.79% -0.03%
==========================================
Files 743 744 +1
Lines 79468 79538 +70
==========================================
+ Hits 33233 33245 +12
- Misses 40759 40819 +60
+ Partials 5476 5474 -2
Continue to review full report at Codecov.
|
* master: (252 commits) Issues overview should not show issues from archived repos (go-gitea#13220) Display SVG files as images instead of text (go-gitea#14101) [skip ci] Updated translations via Crowdin Update docs to clarify issues raised in go-gitea#14272 (go-gitea#14318) [skip ci] Updated translations via Crowdin [Refactor] Passwort Hash/Set (go-gitea#14282) Add option to change username to the admin panel (go-gitea#14229) fix mailIssueCommentBatch for pull request (go-gitea#14252) Remove self from MAINTAINERS (go-gitea#14286) Do not reload page after adding comments in Pull Request reviews (go-gitea#13877) Fix session bug when introduce chi (go-gitea#14287) [skip ci] Updated translations via Crowdin Add secure/httpOnly attributes to the lang cookie (go-gitea#9690) (go-gitea#14279) Some code improvements (go-gitea#14266) [skip ci] Updated translations via Crowdin Fix wrong type on hooktask to convert typ from char(16) to varchar(16) (go-gitea#14148) Upgrade XORM links in documentation. (go-gitea#14265) Check permission for the appropriate unit type (go-gitea#14261) Add compliance check for windows to ensure cross platform build (go-gitea#14260) [skip ci] Updated translations via Crowdin ...