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

Cache key contains reserved characters {}()/\@ #378

Closed
deyan-ardi opened this issue Jun 14, 2021 · 9 comments
Closed

Cache key contains reserved characters {}()/\@ #378

deyan-ardi opened this issue Jun 14, 2021 · 9 comments

Comments

@deyan-ardi
Copy link

Help,
today i use Myth/Auth in Codeigniter 4,
i follow instruction to setting up my Myth/Auth. And the library is work correctly, my code activation was send to my email. But when i click the activation code in my email, i was redirected to http://localhost:8080/activate-account with my code activation. But the page was show this error.

gambar

What should I do?

@MGatner
Copy link
Collaborator

MGatner commented Jun 14, 2021

This is a duplicate of #359. IP addresses will need to be hashed before being used as cache keys.

@deyan-ardi
Copy link
Author

where i can to this?

@MGatner
Copy link
Collaborator

MGatner commented Jun 14, 2021

if ($throttler->check($this->request->getIPAddress(), 2, MINUTE) === false)

@deyan-ardi
Copy link
Author

what can i do to hash ip address? password_hash($this->request->getIPAddress()) ?

@MGatner
Copy link
Collaborator

MGatner commented Jun 14, 2021

This is not cryptographically significant so I would just use md5(). If you implement this please submit it as a Pull Request to this library so the fix is in place for everyone!

@deyan-ardi
Copy link
Author

okay,, I will try it first before doing a Pull Request

@deyan-ardi
Copy link
Author

The problem fix, i only add md5() before $this-request->getIPAddress() in if ($throttler->check($this->request->getIPAddress(), 2, MINUTE) === false) AuthController.php function ActivateAccount

@MGatner
Copy link
Collaborator

MGatner commented Jun 15, 2021

Great! Looking forward to that Pull Request - thanks for taking this on.

@MGatner
Copy link
Collaborator

MGatner commented Jun 18, 2021

Closed by #381.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants