Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong pasteo token cause runtime panic #29

Closed
techport-om opened this issue Dec 2, 2023 · 2 comments
Closed

Wrong pasteo token cause runtime panic #29

techport-om opened this issue Dec 2, 2023 · 2 comments
Labels
wontfix This will not be worked on

Comments

@techport-om
Copy link

Describe the bug
While testing i discovered a case where the library will panic instead of throwing an error. Explicitly while attempting a wrong token "v4.local.1234".

The error is

rusty_paseto-0.6.0/src/core/paseto.rs:766:47:
range end index 32 out of range for slice of length 3

To Reproduce
just try to decrypt "v4.local.1234"

Expected behavior
i was expecting to catch the error same as other errors.

Additional context
I think this problem could be solved by checking the length of the third part. I am interested to create a PR for this as first contribution.

@rrrodzilla
Copy link
Owner

Hey thanks for finding that and the offer for a PR. Feel free to take a stab at it and reach out with any questions. Much appreciated!

@rrrodzilla rrrodzilla added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Dec 4, 2023
@rrrodzilla
Copy link
Owner

I was unable to reproduce this. I wrote a test to check for this but it provides an error in the result as expected. If you've got an example I can repro from I'll be happy to look into it again.

@rrrodzilla rrrodzilla closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
@rrrodzilla rrrodzilla added wontfix This will not be worked on and removed bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants