Repository navigation
v2.12.11
Important
This release fixes a security vulnerability. Upgrade as soon as possible. See UPGRADE.md:
- Form action and redirects to another host via a request URL that starts with
//(CakeRequest::here()is protocol-relative) (GHSA-wh43-gc93-wh4c)
HtmlHelper now outputs the script, link and style tags of HTML5; set html5 to false in its settings to keep the former output.
Security Fixes
- CakeRequest: The request URL loses all its leading slashes and backslashes, not only the first slash, so
CakeRequest::$urlnever starts with/or\andCakeRequest::$here/here()never start with//or/\. A request to//example.com/postswas routed as/example.com/posts, butherewas the protocol-relative URL//example.com/posts:FormHelper::create()without aurlprinted<form action="//example.com/posts">, so the form was submitted to another host, and$this->redirect($this->request->here(false))redirected there. With a base path,here(false)of/base//example.com/postshad the same problem.here()also collapses the leading slashes of a$herechanged by the application. Routing is unchanged (GHSA-wh43-gc93-wh4c, PR #90)
Enhancements: HTML5 Script, Link and Style Tags (PR #86)
- HtmlHelper
html5setting:HtmlHelperoutputs the tags of HTML5 by default:script(),css()and the<style>ofcss()withrelimporthave notypeattribute, andscriptBlock()andscriptStart()neither addtype="text/javascript"nor wrap the script in CDATA. Set'html5' => falsein the settings of the helper for the former output:public $helpers = ['Html' => ['html5' => false]];. Thesafeoption ofscriptBlock(),scriptStart()and the methods ofJsHelperstill adds the CDATA when it istrue; its default follows the setting - Test pages: The test runner and the code coverage report of the web test runner use the tags of HTML5
Tests (PR #87)
- Independent of the skeleton defaults:
ApplicationControllerTest::testRedirect()clearsSession.cacheLimiter, so the'nocache'default of pieceofcake2/app v2.5.3 no longer makes it fail
Upgrading
composer update pieceofcake2/cakephpSee UPGRADE.md, Security Fixes and HTML5 Tags.
Full Changelog: v2.12.10...v2.12.11