Fix decode base64 URL

This commit is contained in:
Richard Wang 2024-12-31 16:16:41 +08:00 committed by GitHub
parent f6354971c4
commit a2665f7993
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,6 +39,6 @@ func decodeBase64URLSafe(content string) (string, error) {
content = strings.ReplaceAll(content, "/", "_") content = strings.ReplaceAll(content, "/", "_")
content = strings.ReplaceAll(content, "+", "-") content = strings.ReplaceAll(content, "+", "-")
content = strings.ReplaceAll(content, "=", "") content = strings.ReplaceAll(content, "=", "")
result, err := base64.StdEncoding.DecodeString(content) result, err := base64.RawURLEncoding.DecodeString(content)
return string(result), err return string(result), err
} }