diff --git a/CHANGELOG.md b/CHANGELOG.md index be13b3a..03d8860 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.4.7] - 2026-02-02 + +### Fixed + +- **Hard main template rendering lock** - Added additional protection at Plugin::render() level + - Added `$rendering_main_template` flag that completely blocks any other render calls while main template is rendering + - Reduced MAX_RENDER_DEPTH from 5 to 2 (allows one level of {% include %} but prevents deeper recursion) + - template-wrapper.php now passes `is_main_template = true` to enable the hard lock + - Any render attempt during main template rendering is immediately blocked + ## [0.4.6] - 2026-02-02 ### Fixed @@ -254,7 +264,8 @@ Initial release of WP FediStream - a WordPress plugin for streaming music over A --- -[Unreleased]: https://src.bundespruefstelle.ch/magdev/wp-fedistream/compare/v0.4.6...HEAD +[Unreleased]: https://src.bundespruefstelle.ch/magdev/wp-fedistream/compare/v0.4.7...HEAD +[0.4.7]: https://src.bundespruefstelle.ch/magdev/wp-fedistream/compare/v0.4.6...v0.4.7 [0.4.6]: https://src.bundespruefstelle.ch/magdev/wp-fedistream/compare/v0.4.5...v0.4.6 [0.4.5]: https://src.bundespruefstelle.ch/magdev/wp-fedistream/compare/v0.4.4...v0.4.5 [0.4.4]: https://src.bundespruefstelle.ch/magdev/wp-fedistream/compare/v0.4.3...v0.4.4 diff --git a/includes/Frontend/template-wrapper.php b/includes/Frontend/template-wrapper.php index f6bfe19..9bd04ee 100644 --- a/includes/Frontend/template-wrapper.php +++ b/includes/Frontend/template-wrapper.php @@ -60,7 +60,8 @@ get_header(); if ( $template_name ) { try { // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - echo $plugin->render( $template_name, $context ); + // Pass true for is_main_template to set the hard rendering lock. + echo $plugin->render( $template_name, $context, true ); } catch ( \Exception $e ) { if ( WP_DEBUG ) { echo '