diff --git a/ui/src/utils/auth.ts b/ui/src/utils/auth.ts index 8a24b17..909971a 100644 --- a/ui/src/utils/auth.ts +++ b/ui/src/utils/auth.ts @@ -53,7 +53,7 @@ function getCaptchaSrc(): string { } function verifyCaptcha(value: string): boolean { - return captcha.value === value.replace(/\s*/g, '').toUpperCase() + return captcha.value.toLowerCase() === value.replace(/\s*/g, '').toLowerCase() } export { login, logout, getLoginStatus, getUser, getUsername, getCaptchaSrc, verifyCaptcha } diff --git a/ui/src/utils/common.ts b/ui/src/utils/common.ts index fd1182f..f6bb9c1 100644 --- a/ui/src/utils/common.ts +++ b/ui/src/utils/common.ts @@ -101,7 +101,7 @@ function randomColor(start: number, end: number): string { } function getCaptcha(width: number, high: number, num: number): Captcha { - const CHARTS = '23456789ABCDEFGHJKLMNPQRSTUVWXYZ'.split('') + const CHARTS = '23456789ABCDEFGHJKLMNPRSTUVWXYZabcdefghijklmnpqrstuvwxyz'.split('') const canvas = document.createElement('canvas') const ctx = canvas.getContext('2d') as CanvasRenderingContext2D