fix: scim 2.0 patch ignore op casing (#9282)

# Which Problems Are Solved
- Some SCIM clients send "op" of a patch operation in PascalCase

# How the Problems Are Solved
- Well known "op" values of patch operations are matched
case-insensitive.

# Additional Context
Related to #8140
This commit is contained in:
Lars
2025-01-31 10:15:39 +01:00
committed by GitHub
parent 563f74640e
commit 20cff9c70a
2 changed files with 6 additions and 3 deletions

View File

@@ -60,6 +60,9 @@ func (req *OperationRequest) Validate() error {
}
func (op *Operation) validate() error {
// ignore the casing, as some scim clients send these capitalized
op.Operation = OperationType(strings.ToLower(string(op.Operation)))
if !op.Operation.isValid() {
return serrors.ThrowInvalidValue(zerrors.ThrowInvalidArgumentf(nil, "SCIM-opty1", "Patch op %s not supported", op.Operation))
}