Closed mbrodala closed 11 months ago
@mbrodala Thanks for the bug report and the pull request. I'll have a look in the next days.
Thanks for the investigation. I opted for a json_decode and on error unserialize the value, so no upgrade wizard is necessary (which would also not be expected on a bugfix release). The fallback will then be removed with version 2.0.0.
Thanks for the adjustment and merge in https://github.com/brotkrueml/typo3-form-rate-limit/commit/435d9c3da07d4ffd08a0433f062c85e4b9acc216
Long story short: JSON encoding a serialized PHP object can fail due to invalid UTF-8 characters.
Avoid this by serializing the whole storage entry instead. This basically leads to double-serialization of the limiter state but this is actually no problem.
Technically we'd also need an upgrade wizard or similar to migrate existing JSON-based entries but this is beyond my time.
Fixes #5