1
0
Fork 0

fix issue

master
Matthew 2022-03-01 15:13:25 -05:00
parent 1164034e55
commit c812a2fe02
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 3 additions and 1 deletions

View File

@ -20,6 +20,7 @@ export default class CWG_SelfService extends Command {
} }
public async run(message: Message, args: string[]) { public async run(message: Message, args: string[]) {
console.log(args);
const reqDomain = `${escape(args[0])}.cloud.libraryofcode.org`; const reqDomain = `${escape(args[0])}.cloud.libraryofcode.org`;
try { try {
@ -113,7 +114,8 @@ export default class CWG_SelfService extends Command {
} }
public domainTextValidation(domain: string) { public domainTextValidation(domain: string) {
if (/[^\w\s-]/.test(domain)) return false; if (/[^\w\s-]/.test(domain.trim().toLowerCase())) return false;
return true;
} }
public async checkAuthorizationToken(userID: string, token: string) { public async checkAuthorizationToken(userID: string, token: string) {