From c812a2fe02da4f38b9bfc20a6a950949c813bfba Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 1 Mar 2022 15:13:25 -0500 Subject: [PATCH] fix issue --- src/commands/cwg_selfserv.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commands/cwg_selfserv.ts b/src/commands/cwg_selfserv.ts index 9796636..a169a7e 100644 --- a/src/commands/cwg_selfserv.ts +++ b/src/commands/cwg_selfserv.ts @@ -20,6 +20,7 @@ export default class CWG_SelfService extends Command { } public async run(message: Message, args: string[]) { + console.log(args); const reqDomain = `${escape(args[0])}.cloud.libraryofcode.org`; try { @@ -113,7 +114,8 @@ export default class CWG_SelfService extends Command { } 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) {