SAP Knowledge Base Article - Public

2800213 - Java exception when slash and backslash passed in OData API call url

Symptom

Java exception occurs when component ID has special characters (either '/'  or '\' is causing the issue) e.g. "//A-10001-01002" https://XXXX-stage.plateau.com/learning/odatav4/public/user/learningPlan/v1/LearningItemDetails( '//A-10001-01002-COURSE-1551096000000')/scheduledofferings

Error: 500 HTTP error returned: Error message = javax.servlet.ServletException: The key value is not valid.

Environment

SuccessFactors Learning Management System (LMS)

Reproducing the Issue

Create an item with forwardslash ("/") or backslash ("\") in the itemID and call this ID in any of LMS OData API get calls (within the url request)

Cause

Special characters forwardslash ("/") or backslash ("\") are not supported in LMS OData API. The reason being there's too much risk for path manipulation or directory traversal attack.

Resolution

If you are planning on utilising our OData API refrain from creating learning/student components with these characters in their IDs.

Keywords

SuccessFactors, SAP, Learning, LMS, Learning Management System, Learning OData API, OData API, special characters, backslash, forwardslash, 500 error, The key value is not valid , KBA , LOD-SF-LMS-ODA , Web Services OData , LOD-SF-LMS , Learning Management System , Problem

Product

SAP SuccessFactors Learning all versions