Skip to content

Remove _serialize from templates#390

Merged
markstory merged 1 commit intomasterfrom
remove-serialize
Dec 10, 2017
Merged

Remove _serialize from templates#390
markstory merged 1 commit intomasterfrom
remove-serialize

Conversation

@cleptric
Copy link
Copy Markdown
Member

@cleptric cleptric commented Dec 8, 2017

@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 8, 2017

Codecov Report

Merging #390 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #390   +/-   ##
=========================================
  Coverage     92.41%   92.41%           
  Complexity      675      675           
=========================================
  Files            25       25           
  Lines          2176     2176           
=========================================
  Hits           2011     2011           
  Misses          165      165

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93e1f12...5aa2dcb. Read the comment docs.

@markstory markstory added this to the 1.5.x milestone Dec 9, 2017
@markstory
Copy link
Copy Markdown
Member

Is this necessary with the auto serialize removed from the app skeleton?

@chinpei215
Copy link
Copy Markdown
Contributor

I think it is necessary. I think people would easy to forget to remove this code from the baked controller. For instance, our official site has not removed the code: https://github.com/cakephp/cakephp.org/blob/e4471d274571e4c9fc9581816077cb54063609e8/src/Controller/Admin/ProjectsController.php#L34
I don't think it is intended to return JSON/XML from the action. And it could be a security hole if we had authorization based on roles.

Copy link
Copy Markdown
Member

@ADmad ADmad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of simply removing it, the generating of statement for setting _serialize var should be made configurable.

@chinpei215
Copy link
Copy Markdown
Contributor

chinpei215 commented Dec 9, 2017

We should recognize this as a potential security risk. In fact, we have already recommended to remove all _serialize from actions, and add it explicitly. So first, I think we should remove _serialize as soon as possible. And if you have some ideas about the new option, we can add it and its documentation.

@rchavik
Copy link
Copy Markdown
Member

rchavik commented Dec 9, 2017

i agree with@chinpei215

@markstory markstory merged commit d742bbc into master Dec 10, 2017
@markstory
Copy link
Copy Markdown
Member

@rchavik @chinpei215 Ok.

@markstory markstory deleted the remove-serialize branch December 10, 2017 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants