You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by a student; reworded and posted here as it is not a major security vulnerability (the API request would still be blocked correctly by the backend, i.e. saving will result in an error if the user has insufficient permissions). Thank you for the report!
Background
The backend already implements the correct access control checks to ensure this editing stories is not possible unless the user has sufficient permissions:
Oh yes, might be a duplicate, thanks for that. Also, on second thought, I think it might be better to just disable the edit route (instead of redirecting), because if we redirect without any additional feedback to the user, there is a possibility that the user gets confused if they mistakenly believe that they have edit rights to a particular story.
Reported by a student; reworded and posted here as it is not a major security vulnerability (the API request would still be blocked correctly by the backend, i.e. saving will result in an error if the user has insufficient permissions). Thank you for the report!
Background
The backend already implements the correct access control checks to ensure this editing stories is not possible unless the user has sufficient permissions:
And the frontend also already hides the edit button in the stories table:
frontend/src/pages/stories/Stories.tsx
Lines 151 to 163 in 105a553
But manually editing the URL from
/view/<story_id>
to/edit/<story_id>
still results in the edit component showing.Proposal
Redirect
/edit/<story_id>
→/view/<story_id>
when the user has insufficient permissions to edit.The text was updated successfully, but these errors were encountered: