260508_12_ENH: 새로고침 시 로그인 풀리는 문제 수정 중

This commit is contained in:
2026-05-08 11:27:20 +09:00
parent b9642961ac
commit 4a06fc7e83

View File

@@ -148,12 +148,12 @@ export class Security {
} }
public static decodeBase64Url(input: string): WordArray { public static decodeBase64Url(input: string): WordArray {
try { if (this.hasSpecialChars(input)) {
const base64url = this.convertFromSpecialChars(input); const base64url = this.convertFromSpecialChars(input);
return CryptoJS.enc.Base64url.parse(base64url); return CryptoJS.enc.Base64url.parse(base64url);
} catch {
return CryptoJS.enc.Base64url.parse(input);
} }
return CryptoJS.enc.Base64url.parse(input);
} }
public static encodeBase64Utf8(input: string): string { public static encodeBase64Utf8(input: string): string {
@@ -169,12 +169,16 @@ export class Security {
} }
public static decodeBase64(input: string): WordArray { public static decodeBase64(input: string): WordArray {
try { if (this.hasSpecialChars(input)) {
const base64 = this.convertFromSpecialChars(input); const base64 = this.convertFromSpecialChars(input);
return CryptoJS.enc.Base64.parse(base64); return CryptoJS.enc.Base64.parse(base64);
} catch { }
return CryptoJS.enc.Base64.parse(input); return CryptoJS.enc.Base64.parse(input);
} }
private static hasSpecialChars(input: string): boolean {
return input.includes("\u200b") || input.includes("\u200c");
} }
public static encodeHex(input: WordArray): string { public static encodeHex(input: WordArray): string {