-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.1] Distinction between real @parent and echoed content #10122
Conversation
Broken build. |
Could you add tests that failed before and now pass please? |
Yes, but not until tomorrow (UTC+2). |
@@ -238,7 +238,8 @@ public function testSectionExtending() | |||
{ | |||
$factory = $this->getFactory(); | |||
$factory->startSection('foo'); | |||
echo 'hi @parent'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add another test that checks parent isn't converted anymore too please?
@taylorotwell I wonder if this change should be made on 5.2 and not 5.1, since it's a massive BC break, and the security implications are only minor. |
What is the massive BC break? |
People might be relying on the fact that the parent processing is done at the factory level, and not at the compiler level. That's quite a big change to make. |
Can you give an example of how it would break an application? |
|
[5.1] Distinction between real @parent and echoed content
Thanks <3 |
Thank you very much @dmgawel. :) |
Thanks very much 👍 |
Great job! 👏 |
Not sure if this is intentional and will stay like this but before if you had: a layout file with a child file which extends layout with
and then the child above also had multiple @include at some point which had their own:
All the @Sections were passed along correctly but now the @section inside the @include is ignored. I found this really helpful in scenarios where for example I had a media manager page. This media manager had multiple sections (tabs). One to upload, another to attach markup, another to embed etc. To help keep things manageable each tabs code and its related scripts section were in a separate @include file. I think with this merge now all the scripts have to be bunched up in to the childs @section which isn't a big problem, but it previously sectioned off nicely :( |
Can you give us the full views to try out? On Friday, September 4, 2015, atmediauk notifications@github.com wrote:
|
This PR has been reverted due to multiple issues with existing applications. It can be attempted on 5.2. We also need to stop referring to it as a security issue since we have no known security exploit related to this bug. |
Thanks for that Taylor, will put together a more complete example of what I meant. https://gist.github.com/atmediauk/65e9bb437691c85a9560 In the gist above the Thanks again :) |
This PR fixes security issue:
@parent
from view data was treated as real@parent
.This is an idea for non-breaking approach without restructuring everything. Needs review and tests.
Closes #10068.