Skip to content

Commit

Permalink
Protect against invalid strategy name. Closes #3886
Browse files Browse the repository at this point in the history
  • Loading branch information
hueniverse committed Nov 23, 2018
1 parent c5d8448 commit e8fa8ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/auth.js
Expand Up @@ -119,6 +119,8 @@ exports = module.exports = internals.Auth = class {
}

const strategy = this._strategies[auth.strategy];
Hoek.assert(strategy, 'Unknown authentication strategy:', auth.strategy);

if (!strategy.methods.verify) {
return;
}
Expand Down

0 comments on commit e8fa8ee

Please sign in to comment.