Fixed: Found a new XXE (XML External Entity Injection) vulnerability in EntityImport (OFBIZ-12304)
The XXE vulnerability can read arbitrary files on the server. Thanks: thiscodecc for reporting this security issue (post-auth)
This commit is contained in:
@@ -833,6 +833,18 @@ public final class UtilValidate {
|
||||
return s.indexOf("://") != -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* urlInString returns true if the string contains :// and not "component://"
|
||||
* @param s String to validate
|
||||
* @return true if s contains :// and not "component://"
|
||||
*/
|
||||
public static boolean urlInString(String s) {
|
||||
if (isEmpty(s) || s.contains("component://")) {
|
||||
return false;
|
||||
}
|
||||
return s.indexOf("://") != -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* isValidUrl returns true if the string is a valid URL (using Commons UrlValidator)
|
||||
* @param s String to validate
|
||||
|
||||
Reference in New Issue
Block a user