Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e88026c

Browse files
Trottrichardlau
andauthoredMar 19, 2022
fixup! fix: correct username and token validation
Co-authored-by: Richard Lau <[email protected]>
1 parent a7c1b2e commit e88026c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function check(username, token) {
2020
errorExit(`username must be a string, received ${typeof username}`);
2121
}
2222
if (!/^[a-zA-Z0-9-]+$/.test(username)) {
23-
errorExit(`username must be alphanumeric, received ${username}`);
23+
errorExit(`username may only contain alphanumeric characters or hyphens, received ${username}`);
2424
}
2525
if (typeof token !== 'string') {
2626
errorExit(`token must be a string, received ${typeof token}`);

0 commit comments

Comments
 (0)
Please sign in to comment.