Repository navigation
🐛 fix: the default logger writes no file; compiled views are not readable - #126
Merged
Merged
Conversation
…able Audit S6/S7, the part 2.x can fix without moving anything: - "errorlog", the default, is error_log() only, as its documentation says: up to 2.1.2 it also appended to <plugin>/storage/logs/<date>.log, which the web server serves as text, and made the folder for it; - Blade compiles to .php, so a direct request runs a compiled view out of context instead of reading its PHP; the .bladec files left behind are removed once per request; - .cache and the default storage/logs are made with wp_mkdir_p() (they were 0777) and get an index.php and a deny-all .htaccess (Support\Storage).
This was referenced Oct 6, 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.
For 2.1.3. This is the part of audit S6/S7 that 2.x can fix without moving anything. 3.0 moves both folders out of the plugin (on
v3).What was wrong, measured on wpbones.test
"errorlog"is the default, and the boilerplates'config/plugin.phpsays it saves to WordPress's log only. Yet the provider also appended everylogger()call to<plugin>/storage/logs/<date>.log, and made that folder0777. Valet's nginx served it with a 200.storage/logsexists in all 14 boilerplates, in Scotty and in Bannerize, and the Cron boilerplate still has a 2024 log in it.<plugin>/.cacheas.bladec, also0777, and a direct request returned the template's compiled PHP.The fix
errorlogiserror_log()only. It writes no file and makes no folder.singleanddailykeep writing where they did..php. A direct request now runs one out of context instead of reading it. The.bladecfiles earlier versions left are removed, once per request..cacheand the defaultstorage/logsare made withwp_mkdir_p()and get anindex.phpand a deny-all.htaccess(Support\Storage::prepare()). A folder the plugin configured itself (plugin.logging.path) is only created, never altered.Tests
composer test: 205 tests and 533 assertions, against 200 and 521 on master. The 5 new ones are inGeneratedFilesTest, and all 5 fail on master.storage-live-smoke.sh:logger()call, a Blade view, and a direct request for the compiled file..bladecexists, and the request returns<?php.Review