Browse Source
* commit '6ec6da1d2b7d7740f449e8cefd7a44cc039d2d09':
DEC-17989 itext XXE安全漏洞修复,参考 930a1c81f8
feature/10.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