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
Repro: send a POST request to /api/v1/api-users/14149/authorisations (any valid api-user id will do; this one is valid in integration) with the body {"application_id":44,"permissions":["nonexistent_permission"]} (any valid application_id will do). You'll need a valid token to put in the Authorization: bearer ... header.
Expected behaviour: error response saying that the nonexistent_permission permission doesn't exist on application 44 (or preferably whatever the human-friendly name is for that app).
Observed behaviour: 500 response with an HTML body, and a stack trace in the log.
The text was updated successfully, but these errors were encountered:
sengi
changed the title
Crash when creating an authorisation with an app permission that doesn't exist
Crash in /api/v1/api-users/<n>/authorisations when a named permission doesn't exist
Mar 28, 2022
sengi
changed the title
Crash in /api/v1/api-users/<n>/authorisations when a named permission doesn't exist
nil dereference in /api/v1/api-users/<n>/authorisations when a named permission doesn't exist
Mar 28, 2022
sengi
changed the title
nil dereference in /api/v1/api-users/<n>/authorisations when a named permission doesn't exist
nil dereference in api/v1/authorisations#create when a named permission doesn't exist
Mar 28, 2022
I've just validated that this is still an issue by adding a test like this one, but adding a permission name that's not in this list. I saw exactly the same exception, although the stack trace has changed slightly since this issue was reported - the exception is now raised on this line.
Repro: send a
POST
request to/api/v1/api-users/14149/authorisations
(any valid api-user id will do; this one is valid in integration) with the body{"application_id":44,"permissions":["nonexistent_permission"]}
(any valid application_id will do). You'll need a valid token to put in theAuthorization: bearer ...
header.Expected behaviour: error response saying that the
nonexistent_permission
permission doesn't exist on application 44 (or preferably whatever the human-friendly name is for that app).Observed behaviour: 500 response with an HTML body, and a stack trace in the log.
Full stack trace:
The text was updated successfully, but these errors were encountered: