Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential problem with ownMaterialNumbers in request params of endpoints #494

Closed
eschrewe opened this issue Jul 12, 2024 · 0 comments · Fixed by #512
Closed

Potential problem with ownMaterialNumbers in request params of endpoints #494

eschrewe opened this issue Jul 12, 2024 · 0 comments · Fixed by #512
Labels
bug Something isn't working

Comments

@eschrewe
Copy link
Contributor

eschrewe commented Jul 12, 2024

Description

The ownMaterialNumber attribute of the Material entity is a string, which may contain many kinds of characters. And not all of these characters are suitable for URL-encoding.

Current behaviour

Several endpoints in the PURIS backend (for example the triggerXXXUpdateForMaterialNumber methods, the trigger endpoint of the ErpAdapterController and possibly several others...) are expecting an ownMaterialNumber as a plain String.
There is a risk that the parameter data arrives in malformed on the backend-side, or that the sending of the request on the frontend-side may fail.

After skimming through the swagger UI, I think the following endpoints are affected (as of today: Jul 12 2024):

  • /erp-adapter/trigger
  • /stockView/update-reported-product-stocks
  • /stockView/update-reported-material-stocks
  • /stockView/supplier
  • /stockView/reported-product-stocks
  • /stockView/reported-material-stocks
  • /stockView/materialnumbers-mapping
  • /stockView/customer
  • /production
  • /production/reported
  • /production/reported/refresh
  • /materials (GET)
  • /materialpartnerrelations (PUT and POST)
  • /demand /GET)
  • /demand/reported
  • /demand/reported/refresh
  • /delivery
  • /delivery/reported/refresh

Expected behavior

Use Base64.
I.e. insert a Base64 decoder on the backend side in the respective endpoint.
And respectively on the frontendside use a Base64 encoder, in all places, where one of the affected backend endpoint is called.

@eschrewe eschrewe added the bug Something isn't working label Jul 12, 2024
@eschrewe eschrewe mentioned this issue Jul 22, 2024
3 tasks
@tom-rm-meyer-ISST tom-rm-meyer-ISST linked a pull request Jul 24, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant