Skip to content

Commit

Permalink
Don't permit access to internal keys via API.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneMcC committed Mar 10, 2019
1 parent 9c3e8cf commit 4db0d72
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/1.0/methods/useradmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ protected function get2FAKeyFromParam($userid, $secretid) {
$key = TwoFactorKey::loadFromUserKey($this->getContextKey('db'), $userid, $secretid);
if ($key === FALSE) {
$this->getContextKey('response')->sendError('Unknown 2fakey: ' . $secretid);
} else if ($key->isInternal()) {
$this->getContextKey('response')->sendError('Unknown 2fakey: ' . $secretid);
}

return $key;
Expand Down

0 comments on commit 4db0d72

Please sign in to comment.