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

NonceRepository creates keys containing reserved characters #192

Open
tomcdonnell opened this issue Sep 3, 2024 · 0 comments
Open

NonceRepository creates keys containing reserved characters #192

tomcdonnell opened this issue Sep 3, 2024 · 0 comments

Comments

@tomcdonnell
Copy link

Cache keys generated in https://github.com/oat-sa/lib-lti1p3-core/blob/master/src/Security/Nonce/NonceRepository.php do not conform to the requirements for cache keys according to PSR-6 and PSR-16. Specifically, the cache keys generated by this file can contain reserved characters {}()/@:.

https://www.php-fig.org/psr/psr-6/#definitions
https://www.php-fig.org/psr/psr-16/#12-definitions

Both documents linked to above state:

The following characters are reserved for future extensions and MUST NOT be supported by implementing libraries: {}()/@:


I ran into this problem while using this library together with php-cache. Cache keys generated by the NonceRepository caused an error in https://github.com/php-cache/cache/blob/master/src/Adapter/Common/AbstractCachePool.php. An exception was thrown in the validateKey() function.

@tomcdonnell tomcdonnell changed the title NonceRepository creates keys containing illegal characters according NonceRepository creates keys containing illegal characters Sep 3, 2024
@tomcdonnell tomcdonnell changed the title NonceRepository creates keys containing illegal characters NonceRepository creates keys containing reserved characters Sep 3, 2024
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

1 participant