mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 04:39:00 +08:00
fix(xss): adapt safelist override to updated jsoup
This commit is contained in:
1 parent
ccdbde5229
commit
cbdd0e202c
1 file changed
+1
-1
+1
-1
@@ -100,7 +100,7 @@ public class XssUtil {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isSafeAttribute(String tagName, Element el, Attribute attr) {
|
||||
public boolean isSafeAttribute(String tagName, Element el, Attribute attr) {
|
||||
// 不允许 javascript 开头的 src 和 href
|
||||
if ("src".equalsIgnoreCase(attr.getKey()) || "href".equalsIgnoreCase(attr.getKey())) {
|
||||
String value = attr.getValue();
|
||||
|
||||
Reference in new issue
Block a user