editoast: no nesting checks between projects, studies and scenarios #5630
Labels
area:editoast
Work on Editoast Service
difficulty:good first issue
Good for newcomers
kind:bug
Something isn't working
severity:major
Major severity bug
What happened?
With the new router implementation in the front part of the application, the user know can access projects, studies, and scenarios using some parameters in the url.
Projects :
operationnal-studies/projects/{projectId}
Studies :
operationnal-studies/projects/{projectId}/studies/{studyId}
Scenario :
operationnal-studies/projects/{projectId}/studies/{studyId}/scenarios/{scenarioId}
All ids are unique in the DB.
But if the user try to access scenario : 4, he can do it from all the studies :
operationnal-studies/projects/1/studies/1/scenarios/4
=> workoperationnal-studies/projects/2180/studies/1/scenarios/4
=> workoperationnal-studies/projects/1/studies/850/scenarios/4
=> workActually the API asks the ids for project, study , and scenario, but just to check if there are some existing ones but not if they're linked together.
What did you expect to happen?
Back must throw a 404 error when the id nesting is not consistent
How can we reproduce it (as minimally and precisely as possible)?
Create a 2 projects and 2 studies
Try to access the study hold by project 1 using the id of project 2
You will retrieve the study even if the project id is not the right one
What operating system, browser and environment are you using?
OSRD version (top right corner
Account
button >Informations
)5c88cf6
The text was updated successfully, but these errors were encountered: