Cache key length-validation results in PCRE compilation error #158
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
With 2.12.0, we introduced a better key length handling for the
PSR-16
decorator. It initially only supported 64 characters which was the minimum whichPSR-16
requires to be supported by implementing cache backends.The redis adapter can take keys up to 512 MB and thus, this was changed in that adapter.
When allowing key length
>65534
, PCRE2 will end up in a compilation error. To avoid this, we are decreasing the maximum supported key length for PSR-16 caches to65534
. Technically, this would be a BC break but given the fact, that cache adapters which state to support longer keys would lead to errors while validating the cache keys, we should be fine.