@@ -20,8 +20,8 @@ struct xmlParserOption : Hashable {
20
20
let rawValue : UInt32 = 0
21
21
}
22
22
23
- var XML_PARSE_NOENT : xmlParserOption { get { return xmlParserOption ( ) } }
24
- var XML_PARSE_DTDLOAD : xmlParserOption { get { return xmlParserOption ( ) } }
23
+ var XML_PARSE_NOENT : xmlParserOption { get { return xmlParserOption ( ) } }
24
+ var XML_PARSE_DTDLOAD : xmlParserOption { get { return xmlParserOption ( ) } }
25
25
26
26
typealias xmlChar = UInt8
27
27
typealias xmlDocPtr = UnsafeMutablePointer < xmlDoc >
@@ -58,6 +58,8 @@ func test() {
58
58
let _ = xmlReadFile ( remoteCharPtr, nil , 0 ) // NO XXE: external entities not enabled
59
59
let _ = xmlReadFile ( remoteCharPtr, nil , Int32 ( XML_PARSE_NOENT . rawValue) ) // $ hasXXE=57
60
60
let _ = xmlReadFile ( remoteCharPtr, nil , Int32 ( XML_PARSE_DTDLOAD . rawValue) ) // $ hasXXE=57
61
+ let _ = xmlReadFile ( remoteCharPtr, nil , Int32 ( XML_PARSE_NOENT . rawValue | XML_PARSE_DTDLOAD . rawValue) ) // $ hasXXE=57
62
+ let _ = xmlReadFile ( remoteCharPtr, nil , Int32 ( XML_PARSE_NOENT . rawValue | 0 ) ) // $ hasXXE=57
61
63
let _ = xmlReadDoc ( remotePtr, nil , nil , 0 ) // NO XXE: external entities not enabled
62
64
let _ = xmlReadDoc ( remotePtr, nil , nil , Int32 ( XML_PARSE_NOENT . rawValue) ) // $ hasXXE=56
63
65
let _ = xmlReadDoc ( remotePtr, nil , nil , Int32 ( XML_PARSE_DTDLOAD . rawValue) ) // $ hasXXE=56
0 commit comments