File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
service/src/main/java/org/lfenergy/compas/scl/validator/common Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 5
5
6
6
import org .lfenergy .compas .scl .validator .exception .SclValidatorException ;
7
7
8
- import javax .xml .XMLConstants ;
9
8
import javax .xml .stream .XMLInputFactory ;
10
9
import javax .xml .stream .XMLStreamException ;
11
10
import javax .xml .stream .events .StartElement ;
@@ -27,13 +26,8 @@ public class NsdocInfo {
27
26
public NsdocInfo (File file ) {
28
27
try (var fis = new FileInputStream (file )) {
29
28
var factory = XMLInputFactory .newInstance ();
30
- // to be compliant, completely disable DOCTYPE declaration:
31
- factory .setProperty (XMLInputFactory .SUPPORT_DTD , false );
32
- // or completely disable external entities declarations:
29
+ // Completely disable external entities declarations:
33
30
factory .setProperty (XMLInputFactory .IS_SUPPORTING_EXTERNAL_ENTITIES , Boolean .FALSE );
34
- // or prohibit the use of all protocols by external entities:
35
- factory .setProperty (XMLConstants .ACCESS_EXTERNAL_DTD , "" );
36
- factory .setProperty (XMLConstants .ACCESS_EXTERNAL_SCHEMA , "" );
37
31
38
32
var reader = factory .createXMLEventReader (fis );
39
33
You can’t perform that action at this time.
0 commit comments