A free open source IT asset/license management system
Don't 500 on malformed emails input
Brady Wetheringtona51b17fb5354
diff --git a/app/Models/SnipeSCIMConfig.php b/app/Models/SnipeSCIMConfig.phpindex 0499482c5b..1aa00eeaea 100644--- a/app/Models/SnipeSCIMConfig.php+++ b/app/Models/SnipeSCIMConfig.php@@ -196,7 +196,12 @@ class SnipeSCIMConfigpublic function doWrite($operation, $subop, $value, Model &$object, Path $path = null, $removeIfNotSet = false){if ($value) {- $object->email = $value[0]['value'];+ try {+ $object->email = $value[0]['value'];+ } catch (\Exception $e) {+ \Log::debug($e);+ throw new SCIMException("Unknown email object: '" . print_r($value, true) . "'", 422);+ }} else {$object->email = null;}