Author: rgoers Date: Mon Jun 24 21:10:05 2013 New Revision: 867277 Log: Fix Javadoc security issues
Modified: websites/production/logging/content/log4j/companions-1.0/component/apidocs/index.html websites/production/logging/content/log4j/companions-1.0/extras/apidocs/index.html websites/production/logging/content/log4j/companions-1.0/extras/testapidocs/index.html websites/production/logging/content/log4j/companions-1.0/receivers/apidocs/index.html websites/production/logging/content/log4j/companions-1.0/zeroconf/apidocs/index.html Modified: websites/production/logging/content/log4j/companions-1.0/component/apidocs/index.html ============================================================================== --- websites/production/logging/content/log4j/companions-1.0/component/apidocs/index.html (original) +++ websites/production/logging/content/log4j/companions-1.0/component/apidocs/index.html Mon Jun 24 21:10:05 2013 @@ -11,6 +11,42 @@ Apache Component Companion for log4j 1.2 targetPage = "" + window.location.search; if (targetPage != "" && targetPage != "undefined") targetPage = targetPage.substring(1); + if (targetPage != "" && !validURL(targetPage)) + targetPage = "undefined"; + function validURL(url) { + var pos = url.indexOf(".html"); + if (pos == -1 || pos != url.length - 5) + return false; + var allowNumber = false; + var allowSep = false; + var seenDot = false; + for (var i = 0; i < url.length - 5; i++) { + var ch = url.charAt(i); + if ('a' <= ch && ch <= 'z' || + 'A' <= ch && ch <= 'Z' || + ch == '$' || + ch == '_') { + allowNumber = true; + allowSep = true; + } else if ('0' <= ch && ch <= '9' + || ch == '-') { + if (!allowNumber) + return false; + } else if (ch == '/' || ch == '.') { + if (!allowSep) + return false; + allowNumber = false; + allowSep = false; + if (ch == '.') + seenDot = true; + if (ch == '/' && seenDot) + return false; + } else { + return false; + } + } + return true; + } function loadFrames() { if (targetPage != "" && targetPage != "undefined") top.classFrame.location = top.targetPage; Modified: websites/production/logging/content/log4j/companions-1.0/extras/apidocs/index.html ============================================================================== --- websites/production/logging/content/log4j/companions-1.0/extras/apidocs/index.html (original) +++ websites/production/logging/content/log4j/companions-1.0/extras/apidocs/index.html Mon Jun 24 21:10:05 2013 @@ -13,6 +13,42 @@ Apache Extras Companion⢠for Apache targetPage = targetPage.substring(1); if (targetPage.indexOf(":") != -1) targetPage = "undefined"; + if (targetPage != "" && !validURL(targetPage)) + targetPage = "undefined"; + function validURL(url) { + var pos = url.indexOf(".html"); + if (pos == -1 || pos != url.length - 5) + return false; + var allowNumber = false; + var allowSep = false; + var seenDot = false; + for (var i = 0; i < url.length - 5; i++) { + var ch = url.charAt(i); + if ('a' <= ch && ch <= 'z' || + 'A' <= ch && ch <= 'Z' || + ch == '$' || + ch == '_') { + allowNumber = true; + allowSep = true; + } else if ('0' <= ch && ch <= '9' + || ch == '-') { + if (!allowNumber) + return false; + } else if (ch == '/' || ch == '.') { + if (!allowSep) + return false; + allowNumber = false; + allowSep = false; + if (ch == '.') + seenDot = true; + if (ch == '/' && seenDot) + return false; + } else { + return false; + } + } + return true; + } function loadFrames() { if (targetPage != "" && targetPage != "undefined") top.classFrame.location = top.targetPage; Modified: websites/production/logging/content/log4j/companions-1.0/extras/testapidocs/index.html ============================================================================== --- websites/production/logging/content/log4j/companions-1.0/extras/testapidocs/index.html (original) +++ websites/production/logging/content/log4j/companions-1.0/extras/testapidocs/index.html Mon Jun 24 21:10:05 2013 @@ -13,6 +13,42 @@ Apache Extras Companion⢠for Apache targetPage = targetPage.substring(1); if (targetPage.indexOf(":") != -1) targetPage = "undefined"; + if (targetPage != "" && !validURL(targetPage)) + targetPage = "undefined"; + function validURL(url) { + var pos = url.indexOf(".html"); + if (pos == -1 || pos != url.length - 5) + return false; + var allowNumber = false; + var allowSep = false; + var seenDot = false; + for (var i = 0; i < url.length - 5; i++) { + var ch = url.charAt(i); + if ('a' <= ch && ch <= 'z' || + 'A' <= ch && ch <= 'Z' || + ch == '$' || + ch == '_') { + allowNumber = true; + allowSep = true; + } else if ('0' <= ch && ch <= '9' + || ch == '-') { + if (!allowNumber) + return false; + } else if (ch == '/' || ch == '.') { + if (!allowSep) + return false; + allowNumber = false; + allowSep = false; + if (ch == '.') + seenDot = true; + if (ch == '/' && seenDot) + return false; + } else { + return false; + } + } + return true; + } function loadFrames() { if (targetPage != "" && targetPage != "undefined") top.classFrame.location = top.targetPage; Modified: websites/production/logging/content/log4j/companions-1.0/receivers/apidocs/index.html ============================================================================== --- websites/production/logging/content/log4j/companions-1.0/receivers/apidocs/index.html (original) +++ websites/production/logging/content/log4j/companions-1.0/receivers/apidocs/index.html Mon Jun 24 21:10:05 2013 @@ -11,6 +11,42 @@ Apache Receivers Companion for log4j 1.2 targetPage = "" + window.location.search; if (targetPage != "" && targetPage != "undefined") targetPage = targetPage.substring(1); + if (targetPage != "" && !validURL(targetPage)) + targetPage = "undefined"; + function validURL(url) { + var pos = url.indexOf(".html"); + if (pos == -1 || pos != url.length - 5) + return false; + var allowNumber = false; + var allowSep = false; + var seenDot = false; + for (var i = 0; i < url.length - 5; i++) { + var ch = url.charAt(i); + if ('a' <= ch && ch <= 'z' || + 'A' <= ch && ch <= 'Z' || + ch == '$' || + ch == '_') { + allowNumber = true; + allowSep = true; + } else if ('0' <= ch && ch <= '9' + || ch == '-') { + if (!allowNumber) + return false; + } else if (ch == '/' || ch == '.') { + if (!allowSep) + return false; + allowNumber = false; + allowSep = false; + if (ch == '.') + seenDot = true; + if (ch == '/' && seenDot) + return false; + } else { + return false; + } + } + return true; + } function loadFrames() { if (targetPage != "" && targetPage != "undefined") top.classFrame.location = top.targetPage; Modified: websites/production/logging/content/log4j/companions-1.0/zeroconf/apidocs/index.html ============================================================================== --- websites/production/logging/content/log4j/companions-1.0/zeroconf/apidocs/index.html (original) +++ websites/production/logging/content/log4j/companions-1.0/zeroconf/apidocs/index.html Mon Jun 24 21:10:05 2013 @@ -11,6 +11,42 @@ Apache Zeroconf Companion for log4j 1.2. targetPage = "" + window.location.search; if (targetPage != "" && targetPage != "undefined") targetPage = targetPage.substring(1); + if (targetPage != "" && !validURL(targetPage)) + targetPage = "undefined"; + function validURL(url) { + var pos = url.indexOf(".html"); + if (pos == -1 || pos != url.length - 5) + return false; + var allowNumber = false; + var allowSep = false; + var seenDot = false; + for (var i = 0; i < url.length - 5; i++) { + var ch = url.charAt(i); + if ('a' <= ch && ch <= 'z' || + 'A' <= ch && ch <= 'Z' || + ch == '$' || + ch == '_') { + allowNumber = true; + allowSep = true; + } else if ('0' <= ch && ch <= '9' + || ch == '-') { + if (!allowNumber) + return false; + } else if (ch == '/' || ch == '.') { + if (!allowSep) + return false; + allowNumber = false; + allowSep = false; + if (ch == '.') + seenDot = true; + if (ch == '/' && seenDot) + return false; + } else { + return false; + } + } + return true; + } function loadFrames() { if (targetPage != "" && targetPage != "undefined") top.classFrame.location = top.targetPage;