You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/11/02 09:33:00 UTC
[jira] [Work logged] (WW-5252) Completely disable external entities declarations in XML config
[ https://issues.apache.org/jira/browse/WW-5252?focusedWorklogId=822604&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-822604 ]
ASF GitHub Bot logged work on WW-5252:
--------------------------------------
Author: ASF GitHub Bot
Created on: 02/Nov/22 09:32
Start Date: 02/Nov/22 09:32
Worklog Time Spent: 10m
Work Description: lukaszlenart merged PR #628:
URL: https://github.com/apache/struts/pull/628
Issue Time Tracking
-------------------
Worklog Id: (was: 822604)
Time Spent: 40m (was: 0.5h)
> Completely disable external entities declarations in XML config
> ---------------------------------------------------------------
>
> Key: WW-5252
> URL: https://issues.apache.org/jira/browse/WW-5252
> Project: Struts 2
> Issue Type: Improvement
> Components: XML Configuration
> Reporter: Lukasz Lenart
> Priority: Major
> Fix For: 6.1.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Reported by Sonar
> https://sonarcloud.io/project/issues?id=apache_struts&issues=AW_X5AiQ1FYS5oU8LTA8&open=AW_X5AiQ1FYS5oU8LTA8
> {code:java}
> SAXParserFactory factory = SAXParserFactory.newInstance();
> factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
> factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
> {code}
> https://sonarcloud.io/project/issues?id=apache_struts&issues=AXFGIxd5s40Y9j2_QZHd&open=AXFGIxd5s40Y9j2_QZHd
> {code:java}
> TransformerFactory factory = javax.xml.transform.TransformerFactory.newInstance();
> // to be compliant, prohibit the use of all protocols by external entities:
> factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
> factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "");
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)