publicstaticbooleantestURLPassesExclude(String url, String exclude) { if (exclude.endsWith("*")) { if (url.startsWith(exclude.substring(0, exclude.length()-1))) { // Now make sure that there are no ".." characters in the rest of the URL. if (!url.contains("..") && !url.toLowerCase().contains("%2e")) { returntrue; } } } elseif (exclude.contains("?")) { if (url.equals(exclude)) { returntrue; } } else { intparamIndex= url.indexOf("?"); if (paramIndex != -1) { url = url.substring(0, paramIndex); } if (url.equals(exclude)) { returntrue; } } returnfalse; }