You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Noted that attributes or excludedAttributes query params is incorrectly processed if value contains more than 1 dot.
Example calls:
../Users?excludedAttributes=part1.part2.part3
../Users?attributes=part1.part2.part3
Produces 500 error code with response:
{
"detail": "An internal error has occurred.",
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": 500
}
Debug log contains the following message:
Caused by: java.lang.NullPointerException: Cannot invoke "String.replaceFirst(String, String)" because "scimNodeName" is null
at de.captaingoldfish.scim.sdk.common.schemas.Schema.lambda$getSchemaAttribute$4(Schema.java:277)
at java.base/java.util.Optional.orElseGet(Optional.java:364)
at de.captaingoldfish.scim.sdk.common.schemas.Schema.getSchemaAttribute(Schema.java:276)
at de.captaingoldfish.scim.sdk.server.utils.RequestUtils.lambda$getSchemaAttribute$3(RequestUtils.java:330)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at de.captaingoldfish.scim.sdk.server.utils.RequestUtils.getSchemaAttribute(RequestUtils.java:332)
at de.captaingoldfish.scim.sdk.server.utils.RequestUtils.getSchemaAttributeByAttributeName(RequestUtils.java:268)
at de.captaingoldfish.scim.sdk.server.utils.RequestUtils.lambda$getAttributes$0(RequestUtils.java:94)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310)
at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at de.captaingoldfish.scim.sdk.server.utils.RequestUtils.getAttributes(RequestUtils.java:95)
at de.captaingoldfish.scim.sdk.server.endpoints.ResourceEndpointHandler.listResources(ResourceEndpointHandler.java:552)
Expected result: 400 status code is reported with response:
{
"detail": "Attribute 'part1.part2.part3' is unknown to resource type 'User'",
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": 400,
"scimType": "invalidPath"
}
The text was updated successfully, but these errors were encountered:
sorry for the late reply.
I actually do not consider this a bug, but I should add a validation to schema-registration that forbids using .-characters in attribute-names. .-characters must not be used in attribute-names because the dot is reserved-character that is used to determine attribute-paths.
I leave this ticket open until I added an appropriate validation to schema registration
Hi,
Noted that attributes or excludedAttributes query params is incorrectly processed if value contains more than 1 dot.
Example calls:
../Users?excludedAttributes=part1.part2.part3
../Users?attributes=part1.part2.part3
Produces 500 error code with response:
{
"detail": "An internal error has occurred.",
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": 500
}
Debug log contains the following message:
Caused by: java.lang.NullPointerException: Cannot invoke "String.replaceFirst(String, String)" because "scimNodeName" is null
at de.captaingoldfish.scim.sdk.common.schemas.Schema.lambda$getSchemaAttribute$4(Schema.java:277)
at java.base/java.util.Optional.orElseGet(Optional.java:364)
at de.captaingoldfish.scim.sdk.common.schemas.Schema.getSchemaAttribute(Schema.java:276)
at de.captaingoldfish.scim.sdk.server.utils.RequestUtils.lambda$getSchemaAttribute$3(RequestUtils.java:330)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at de.captaingoldfish.scim.sdk.server.utils.RequestUtils.getSchemaAttribute(RequestUtils.java:332)
at de.captaingoldfish.scim.sdk.server.utils.RequestUtils.getSchemaAttributeByAttributeName(RequestUtils.java:268)
at de.captaingoldfish.scim.sdk.server.utils.RequestUtils.lambda$getAttributes$0(RequestUtils.java:94)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310)
at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at de.captaingoldfish.scim.sdk.server.utils.RequestUtils.getAttributes(RequestUtils.java:95)
at de.captaingoldfish.scim.sdk.server.endpoints.ResourceEndpointHandler.listResources(ResourceEndpointHandler.java:552)
Expected result: 400 status code is reported with response:
{
"detail": "Attribute 'part1.part2.part3' is unknown to resource type 'User'",
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:Error"
],
"status": 400,
"scimType": "invalidPath"
}
The text was updated successfully, but these errors were encountered: