[
https://issues.apache.org/jira/browse/OFBIZ-10597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16687818#comment-16687818 ]
Aditya Sharma commented on OFBIZ-10597:
---------------------------------------
Instead of having multiple null checks for viewMap separately for each security header we can have a single combined null check at the top in setResponseBrowserDefaultSecurityHeaders() method.
With increasing security headers these may become expensive.
Done in
trunk r1846632
R17.12 r1846633
R16.11 r1846634
> Missing Security and Cache Headers in CMS Events
> ------------------------------------------------
>
> Key: OFBIZ-10597
> URL:
https://issues.apache.org/jira/browse/OFBIZ-10597> Project: OFBiz
> Issue Type: Bug
> Components: cmssite, securityext
> Affects Versions: Trunk, Release Branch 16.11, Release Branch 17.12
> Reporter: Deepak Nigam
> Assignee: Deepak Nigam
> Priority: Major
> Fix For: 17.12.01, 16.11.06
>
> Attachments: OFBIZ-10597.diff, OFBiz-10597.patch
>
>
> While rendering the view through the controller request we set the important security headers like x-frame-options, strict-transport-security, x-content-type-options, X-XSS-Protection and Referrer-Policy etc. in the response object. (Please see the 'rendervView' method of RequestHandler class.)
>
> In the similar line, we set the cache related headers like Expires, Last-Modified, Cache-Control, Pragma.
>
> But these security headers are missing in the pages rendered through CMS. (Please visit the CmsEvents class).
>
> These headers are very crucial for the security of the application as they help to prevent various security threats like cross-site scripting, cross-site request forgery, clickjacking etc.
>
> IMO, we should add these security headers in the response object prepared through the CMS also. WDYT?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)