Skip to content

Commit

Permalink
fix(auth): allows matching of mixed-case usernames
Browse files Browse the repository at this point in the history
Allow inserting the lowercase version of the Gitlab username, since it's accepted by the Gitlab API
  • Loading branch information
GFWagnitz committed Dec 2, 2019
1 parent ccafea2 commit d75f300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gitlab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default class VerdaccioGitLab implements VerdaccioGitLabPlugin {

GitlabAPI.Users.current()
.then(response => {
if (user !== response.username) {
if (user !== response.username.toLowerCase()) {
return cb(getUnauthorized('wrong gitlab username'));
}

Expand Down

0 comments on commit d75f300

Please sign in to comment.