File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ def require_project_by_uuid(
223223 expose (bool, optional): Controls security disclosure behavior on permission failure.
224224 - If `True`: Returns 403 Forbidden (reveals project exists but access is denied).
225225 - If `False`: Returns 404 Not Found (hides project existence for security).
226- Defaults to `True` for v1 endpoints compatibility.
226+ Standard is that reading results in 404, while writing results in 403
227227 """
228228 if not is_valid_uuid (uuid ):
229229 abort (404 )
Original file line number Diff line number Diff line change @@ -180,11 +180,11 @@ def test_get_project(client):
180180 # anonymous user cannot access the private resource
181181 response = client .get (f"v2/projects/{ project .id } " )
182182 assert response .status_code == 404
183- # lack of permissions
183+ # lack of permissions also results in 404 for GET project
184184 user = add_user ("tests" , "tests" )
185185 login (client , user .username , "tests" )
186186 response = client .get (f"v2/projects/{ project .id } " )
187- assert response .status_code == 403
187+ assert response .status_code == 404
188188 # access public project
189189 project .public = True
190190 db .session .commit ()
You can’t perform that action at this time.
0 commit comments