scimmy icon indicating copy to clipboard operation
scimmy copied to clipboard

Invalid values of startIndex lead to errors

Open christiaangoossens opened this issue 6 months ago • 1 comments

According to RFC 7644, values of startIndex in the URL query have the following definition: A value less than 1 SHALL be interpreted as 1.

However, a request to /Users?startIndex=0 or /Groups?startIndex=0 fails with the following error: Expected 'startIndex' parameter to be a positive integer in ListResponse message constructor, instead of just using the value 1.

https://github.com/scimmyjs/scimmy/blob/8a25458fbc122e27d6b65cf52a91bdd0d140a62d/src/lib/messages/listresponse.js#L57 seems to do this correctly, but it's stopped before by the check in lines https://github.com/scimmyjs/scimmy/blob/8a25458fbc122e27d6b65cf52a91bdd0d140a62d/src/lib/messages/listresponse.js#L44-L49.

Should we just remove that check?

christiaangoossens avatar Aug 15 '24 10:08 christiaangoossens