Skip to content

Commit d75f300

Browse files
committed
fix(auth): allows matching of mixed-case usernames
Allow inserting the lowercase version of the Gitlab username, since it's accepted by the Gitlab API
1 parent ccafea2 commit d75f300

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gitlab.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default class VerdaccioGitLab implements VerdaccioGitLabPlugin {
9797

9898
GitlabAPI.Users.current()
9999
.then(response => {
100-
if (user !== response.username) {
100+
if (user !== response.username.toLowerCase()) {
101101
return cb(getUnauthorized('wrong gitlab username'));
102102
}
103103

0 commit comments

Comments
 (0)