jasonfagerberg-toast opened a new issue, #695:
URL: https://github.com/apache/directory-scimple/issues/695

   When provided a patch operation like so
   
   ```json
   {
     "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
     "Operations": [
       {
         "op": "replace",
         "path": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
         "value": {
           "costCenter": "New Cost Center",
           "department": "New Department"
         }
       }
     ]
   }
   ```
   
   `DefaultPatchHander` throws a Null Pointer Exception
   
   ```
   java.lang.NullPointerException
        at 
org.apache.directory.scim.core.repository.DefaultPatchHandler.apply(DefaultPatchHandler.java:135)
        at 
org.apache.directory.scim.core.repository.DefaultPatchHandler.apply(DefaultPatchHandler.java:118)
        at 
org.apache.directory.scim.core.repository.PatchHandlerTest.applyReplaceEntireEnterpriseExtension(PatchHandlerTest.java:327)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
   ```
   
   This seems to be because `DefaultPatchHandler.attributeReference` 
incorrectly parses the path as though it is an attribute path instead of a 
value path
   
   
![image](https://github.com/user-attachments/assets/b8e5d500-c61d-487d-8e68-8adab0c70e0e)
   
   I believe by reading 
[RFC-7644](https://datatracker.ietf.org/doc/html/rfc7644#section-3.5.2.3) this 
should be a valid request. Please feel free to correct me if I am wrong! 😄 
   
   I have written a test to illustrate the error 
https://github.com/apache/directory-scimple/pull/694


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org
For additional commands, e-mail: dev-h...@directory.apache.org

Reply via email to