fix: validate client before adding to url parameters#4613
Conversation
validate client before adding to url parameters
🦋 Changeset detectedLatest commit: 1524f12 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
correction
heimwege
left a comment
There was a problem hiding this comment.
The core fix is correct and sufficient to satisfy the SonarCloud rule. The tests are well-structured.
SummaryThe following content is AI-generated and provides a summary of the pull request: Fix: Validate
|
There was a problem hiding this comment.
The PR correctly validates that sap-client is exactly 3 digits before appending it to the URL, which resolves the Sonar finding. Two issues worth addressing: the libs value built from manifest keys is still concatenated into the URL without encoding (a similar tainted-data risk), and the test suite is missing a case for a client value shorter than 3 characters, leaving that branch untested.
additional test
review comment
adjustment
vadson71
left a comment
There was a problem hiding this comment.
Code changes look good
Covered by test
Didn't test locally
|
Klaus-Keller
left a comment
There was a problem hiding this comment.
Thanks @815are!
- changes to validate URL parameters looks good, exactly 3 digits
- changeset has been added, patch is correct
- test coverage is great
- did a visual and AI aided review
Approved from my side.



Attempt to fix sonar issue ->
https://sonarcloud.io/organizations/sap-1/rules?open=tssecurity%3AS8476&rule_key=tssecurity%3AS8476
in -> https://github.com/SAP/open-ux-tools/blob/main/packages/preview-middleware-client/src/flp/init.ts#L190-L193