Skip to content

Commit 8345457

Browse files
Address security concern raised by Github
1 parent 7657a4d commit 8345457

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/dot_ext/views/authorization.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,12 @@ def post(self, request, *args, **kwargs):
481481
app = validate_app_is_active(request)
482482
except (InvalidClientError, InvalidGrantError, InvalidRequestError) as error:
483483
return json_response_from_oauth2_error(error)
484-
except PermissionDenied as e:
484+
except PermissionDenied:
485+
log.exception('Permission denied during token endpoint processing.')
486+
# This error will not match other errors thrown by this waffle_flag as Github raised
487+
# a security concern about it, but only here.
485488
return JsonResponse(
486-
{'status_code': 403, 'message': str(e)},
489+
{'status_code': 403, 'message': 'You do not have permission to perform this action.'},
487490
status=403,
488491
)
489492

0 commit comments

Comments
 (0)