260508_12_ENH: 새로고침 시 로그인 풀리는 문제 수정 중
This commit is contained in:
@@ -148,12 +148,12 @@ export class Security {
|
||||
}
|
||||
|
||||
public static decodeBase64Url(input: string): WordArray {
|
||||
try {
|
||||
if (this.hasSpecialChars(input)) {
|
||||
const base64url = this.convertFromSpecialChars(input);
|
||||
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 {
|
||||
@@ -169,12 +169,16 @@ export class Security {
|
||||
}
|
||||
|
||||
public static decodeBase64(input: string): WordArray {
|
||||
try {
|
||||
if (this.hasSpecialChars(input)) {
|
||||
const base64 = this.convertFromSpecialChars(input);
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user