mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 23:11:24 +08:00
Added lowercase letters to captcha
This commit is contained in:
@@ -53,7 +53,7 @@ function getCaptchaSrc(): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function verifyCaptcha(value: string): boolean {
|
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 }
|
export { login, logout, getLoginStatus, getUser, getUsername, getCaptchaSrc, verifyCaptcha }
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ function randomColor(start: number, end: number): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getCaptcha(width: number, high: number, num: number): Captcha {
|
function getCaptcha(width: number, high: number, num: number): Captcha {
|
||||||
const CHARTS = '23456789ABCDEFGHJKLMNPQRSTUVWXYZ'.split('')
|
const CHARTS = '23456789ABCDEFGHJKLMNPRSTUVWXYZabcdefghijklmnpqrstuvwxyz'.split('')
|
||||||
|
|
||||||
const canvas = document.createElement('canvas')
|
const canvas = document.createElement('canvas')
|
||||||
const ctx = canvas.getContext('2d') as CanvasRenderingContext2D
|
const ctx = canvas.getContext('2d') as CanvasRenderingContext2D
|
||||||
|
|||||||
Reference in New Issue
Block a user