fix: bound DWH credential digest validation
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user