Skip to content

Similar key validation error #324

Closed
@antoniogeroncio

Description

@antoniogeroncio

Hello!

Sorry for my English,
I have possibly encountered an error in the library, I am running the following scenario:

I created two tokens:

secretkey1 = 6uh04S60wnp7R6YvyNXtJzHMRpvsG0MsBWMuOnFP9vhXhc3AUSu6sVglcEUV

tokenSecretkey1 = eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE1MjY2Mzk2MTV9.7vEadBgnhgCJJkoPcwuailTkNl2cmjTT5ZrbkdaQv1f4GGkLetL5SvtQC0Ronis3U7of7wUlh2kzaXvl3Cbqog

secretkey2 = 6uh04S60wnp7R6YvyNXtJzHMRpvsG0MsBWMuOnFP9vhXhc3AUSu6sVglcEUVxx

tokenSecretkey2 = eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE1MjY2Mzk2MjB9.Y_T1Pzylm6kQ9IFSB3wMsIgpS4hD9DdHDVa2ZZOyykYacrPfNh3P4fSWNuHEl13Gg8XajOr02cxZ7UkZvxIm2Q

When trying to validate the two tokens with the secret key 1 the library shows that the result is valid.

Jwts.parser().setSigningKey(secretkey1).parseClaimsJws(tokenSecretkey1) = valid

Jwts.parser().setSigningKey(secretkey1).parseClaimsJws(tokenSecretkey2) = valid

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions