We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When POSTing1 a new location through the api, an invalid parent_id parameter is ignored silently.
parent_id
POST a new location with a nonexistent parent_id:
{ "name": "New location", "parent_id": -5 }
The request will succeed, but the created location doesn't have parent set.
The request should return a failure indicating that the parent_id was invalid. It already does this with invalid manager_id:
manager_id
{ "status": "error", "messages": { "manager_id": [ "The selected manager id is invalid." ] }, "payload": null }
No response
7.0.10
Ubuntu (Container)
Apache
8.1
Container in Kubernetes.
Likely this affects PUT and PATCH operations as well. ↩
The text was updated successfully, but these errors were encountered:
Merge pull request #15356 from snipe/validate_location_parent
d0acf5b
Fixed #15341 - validate parent ID
4d03f1e
Fixed snipe#15341 - validate parent ID
ae8e4f4
Signed-off-by: snipe <snipe@snipe.net>
No branches or pull requests
Debug mode
Describe the bug
When POSTing1 a new location through the api, an invalid
parent_id
parameter is ignored silently.Reproduction steps
POST a new location with a nonexistent
parent_id
:The request will succeed, but the created location doesn't have parent set.
Expected behavior
The request should return a failure indicating that the
parent_id
was invalid. It already does this with invalidmanager_id
:Screenshots
No response
Snipe-IT Version
7.0.10
Operating System
Ubuntu (Container)
Web Server
Apache
PHP Version
8.1
Operating System
No response
Browser
No response
Version
No response
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
No response
Additional context
Container in Kubernetes.
Footnotes
Likely this affects PUT and PATCH operations as well. ↩
The text was updated successfully, but these errors were encountered: