Repository navigation
Conversation
pyrech
reviewed
Sep 29, 2026
pyrech
force-pushed
the
security/private-phar-extraction-directory
branch
from
September 29, 2026 12:06
3c8076a to
95dfee1
Compare
Member
|
Thanks a lot for your PR @thomas-chauchefoin-tob I have just squashed your commits and applied review suggestions. |
lyrixx
reviewed
Sep 29, 2026
Follow the XDG cache directory, fall back to the temporary directory when the home is not usable, prune stale directories and never let an extraction failure break the host application.
pyrech
force-pushed
the
security/private-phar-extraction-directory
branch
from
September 29, 2026 12:21
95dfee1 to
8396d09
Compare
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.
PHAR resources are currently extracted to a predictable directory under
sys_get_temp_dir()/jolinotif. On systems with a shared temporary directory, another local user could pre-create these paths and place a malicious FFI header, causing JoliNotif to load an attacker-controlled shared library.This change moves extraction into a private cache,
$HOME/.jolinotifon Linux and macOS and%LOCALAPPDATA%\JoliNotifon Windows. It also includes a SHA-256 digest of the PHAR in the cache name to prevent distinct versions from reusing/overwriting each other's resources, and it attempts to handle concurrent access.@pyrech I'm just starting with a CI run on this one and will ping you later for a more thorough review; the tests likely need more work.