Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
RedisCache currently passes cached bytes to pickle.loads. A party able to modify those values can cause Python objects to be executed when the crawler reads the cache. This PR replaces pickle with JSON while preserving TTL and the existing string/basic-value callers.
Legacy pickle entries and malformed JSON become cache misses; no pickle fallback or unrelated key deletion is performed. docs/redis-cache-format.md describes supported values and the restart/cold-cache implications. Arbitrary Python objects and restoration of tuple types are no longer supported.
Validation: all 8 new regression cases fail before the fix. On this isolated branch based on upstream main d6f7c5b, the complete tests/ suite passes (104 tests, Python 3.11, Windows with PYTHONUTF8=1). Tests use a mocked Redis client and assert that pickle.loads is never invoked. No live credentials or Redis service are required. The same fix also passed Linux/Windows tests and WebUI/documentation builds in fork PR #16.
This PR contains only the Redis fix, regression tests, and format migration note. Related report: saksim#3.