fix: bound DWH credential digest validation

This commit is contained in:
User
2026-08-20 23:10:02 +02:00
parent 3bc84b0bc3
commit 1e82fd33fd
2 changed files with 21 additions and 2 deletions
+3
View File
@@ -111,6 +111,9 @@ func validInstallationID(value string) bool {
}
func validDigest(value string) bool {
if len(value) != 43 {
return false
}
decoded, err := base64.RawURLEncoding.DecodeString(value)
return err == nil && len(decoded) == 32 && base64.RawURLEncoding.EncodeToString(decoded) == value
}