mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-09 10:19:26 +00:00
🔒️(backend) avoid information exposure through exception messages
Sanitize error handling to prevent leaking internal details when invalid or malicious requests are sent to the API. Return generic error responses to reduce the risk of information disclosure during probing attempts.
This commit is contained in:
committed by
aleb_the_flash
parent
73bcb9d598
commit
dcb788b57b
@@ -488,9 +488,7 @@ class RoomViewSet(
|
||||
if status_code == drf_status.HTTP_500_INTERNAL_SERVER_ERROR:
|
||||
raise e
|
||||
|
||||
return drf_response.Response(
|
||||
{"status": "error", "message": str(e)}, status=status_code
|
||||
)
|
||||
return drf_response.Response({"status": "error"}, status=status_code)
|
||||
|
||||
@decorators.action(
|
||||
detail=False,
|
||||
@@ -757,10 +755,10 @@ class RecordingViewSet(
|
||||
recording_id = parser.get_recording_id(request.data)
|
||||
|
||||
except ParsingEventDataError as e:
|
||||
raise drf_exceptions.PermissionDenied(f"Invalid request data: {e}") from e
|
||||
raise drf_exceptions.PermissionDenied("Invalid request data.") from e
|
||||
|
||||
except InvalidBucketError as e:
|
||||
raise drf_exceptions.PermissionDenied("Invalid bucket specified") from e
|
||||
raise drf_exceptions.PermissionDenied("Invalid bucket specified.") from e
|
||||
|
||||
except InvalidFilepathError:
|
||||
return drf_response.Response(
|
||||
|
||||
Reference in New Issue
Block a user