Browse Source
* commit '8ab7742594e48561a5581835382ac4ba60811794':
DEC-17989 itext XXE安全漏洞修复,参考 930a1c81f8
research/11.0
superman
4 years ago
6 changed files with 44 additions and 0 deletions
@ -0,0 +1,18 @@
|
||||
package com.fr.third.com.lowagie.text; |
||||
|
||||
import java.io.IOException; |
||||
import java.io.StringReader; |
||||
import org.xml.sax.EntityResolver; |
||||
import org.xml.sax.InputSource; |
||||
import org.xml.sax.SAXException; |
||||
|
||||
/** |
||||
* @author Hugh.C |
||||
* @version 1.0 |
||||
* Created by Hugh.C on 2021/4/26 |
||||
*/ |
||||
public class SafeEmptyEntityResolver implements EntityResolver { |
||||
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { |
||||
return new InputSource(new StringReader("")); |
||||
} |
||||
} |
@ -0,0 +1,18 @@
|
||||
package com.fr.third.v2.lowagie.text; |
||||
|
||||
import java.io.IOException; |
||||
import java.io.StringReader; |
||||
import org.xml.sax.EntityResolver; |
||||
import org.xml.sax.InputSource; |
||||
import org.xml.sax.SAXException; |
||||
|
||||
/** |
||||
* @author Hugh.C |
||||
* @version 1.0 |
||||
* Created by Hugh.C on 2021/4/26 |
||||
*/ |
||||
public class SafeEmptyEntityResolver implements EntityResolver { |
||||
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { |
||||
return new InputSource(new StringReader("")); |
||||
} |
||||
} |
Loading…
Reference in new issue