Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Device deletion: check UI auth matches access token #2591

Merged
merged 1 commit into from
Oct 27, 2017

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Oct 26, 2017

(otherwise there's no point in the UI auth)

(otherwise there's no point in the UI auth)
# check that the UI auth matched the access token
user_id = result[constants.LoginType.PASSWORD]
if user_id != requester.user.to_string():
raise errors.AuthError(403, "Invalid auth")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I... am slightly surprised that check_auth doesn't either return or accept a user_id. OTOH, seems to be what everywhere else does so lets not try and fix it in this PR

@richvdh richvdh merged commit 4d83632 into develop Oct 27, 2017
@richvdh richvdh deleted the rav/device_delete_auth branch October 27, 2017 11:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants