Browse Source
Merge in CORE/base-third from ~HUGH.C/base-third:DEC-17989 to release/10.0
* commit 'cf19d66e815bddcde47a97fc48be23eacfa221a0':
DEC-17989 itext XXE安全漏洞修复,参考 930a1c81f8
release/10.0
Hugh.C
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