Conversation
…ening (SDF-69,70,71,67,68) Batch A (Response): - SDF-69: setHeader/addHeader reject CR/LF/NUL (response splitting) - SDF-70: redirect() validates URL scheme (open redirect) - SDF-71: download() sanitizes filename per RFC 6266 Batch C (Cache/Fuse): - SDF-67: FileDriver chmod always (removed SAPI guard); saveTagIndex atomic; Core config cache legacy branch chmods - SDF-68: Fuse cache write atomic (temp+LOCK_EX+rename+chmod) 9 new ResponseTest security tests. Bump 2.3.3 -> 2.3.4.
Owner
Author
|
All checks have passed, ready for code review. |
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.
Summary
Resolves 5 High severity findings from the security audit. Non-breaking patch release bumping 2.3.3 → 2.3.4.
Fixes
Batch A - Response hardening
Response::setHeader()/addHeader()InvalidArgumentException. Defense-in-depth on top of PHP's nativeheader()CRLF rejection.Response::redirect()isSafeRedirectUrl()- blocks protocol-relative (//evil.com),javascript:,data:,vbscript:; allows relative paths +http(s)://.Response::download()" \r \n \0, emit bothfilename="..."andfilename*=UTF-8''...for cross-browser compatibility.Batch C - Cache/Fuse hardening
FileDriver::write()+saveTagIndex()+Core.phpchmod 0600always (removed SAPI guard);saveTagIndex()converted to atomic temp+rename+chmod; Core config cache legacy branch chmods.Fuse::render()cache writefile_put_contentsto atomic temp+LOCK_EX+chmod+rename. Closes TOCTOU cache-poisoning RCE on shared hosting.Tests
9 new security tests in
tests/ResponseTest.php:javascript:/data:scheme rejectionhttp(s)://allowedVerification
Wiki
wiki/libraries/response.md- setHeader/addHeader throws notes, redirect URL validation, download filename sanitization, error handling updateswiki/libraries/caching.md- new "Atomic writes and file permissions (v2.3.4+)" sectionwiki/libraries/fuse.md- new "Atomic cache writes (v2.3.4+)" section