Files
José F. Romaniello 1bb584bc38 Verification with an asymmetric key of a token signed with a symmetric key
There is a vulnerability in this module when the verification part is expecting a token digitally signed with an asymetric key (RS/ES family) of algorithms but instead the attacker send a token digitally signed with a symmetric algorithm (HS* family).

The issue is because this library has the very same signature to verify both type of tokens (parameter: `secretOrPublicKey`).

This change adds a new parameter to the verify called `algorithms`. This can be used to specify a list of supported algorithms, but the default value depends on the secret used: if the secretOrPublicKey contains the string `BEGIN CERTIFICATE` the default is `[ 'RS256','RS384','RS512','ES256','ES384','ES512' ]` otherwise is `[ 'HS256','HS384','HS512' ]`.
2015-03-16 20:36:22 -03:00
..
2015-03-06 09:14:55 -03:00
2013-06-30 22:27:13 -03:00
2015-03-10 13:59:38 -03:00
2015-03-06 11:53:05 -03:00
2013-06-30 22:27:13 -03:00
2013-06-30 22:27:13 -03:00