Return-Path: X-Original-To: apmail-cocoon-cvs-archive@www.apache.org Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E19FDC096 for ; Thu, 20 Jun 2013 12:10:08 +0000 (UTC) Received: (qmail 8157 invoked by uid 500); 20 Jun 2013 12:10:08 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 8056 invoked by uid 500); 20 Jun 2013 12:10:03 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 8038 invoked by uid 99); 20 Jun 2013 12:10:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jun 2013 12:10:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jun 2013 12:10:00 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 0E7022388868 for ; Thu, 20 Jun 2013 12:09:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1494948 - in /cocoon/site/site: 2.1/apidocs/ 2.2/maven-plugins/it-fw/1.0/apidocs/ 2.2/maven-plugins/maven-plugin/1.0/apidocs/ 3.0/apidocs/ subprojects/servlet-service/servlet-service-impl/apidocs/ subprojects/servlet-service/servlet-servic... Date: Thu, 20 Jun 2013 12:09:40 -0000 To: cvs@cocoon.apache.org From: ilgrosso@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130620120941.0E7022388868@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ilgrosso Date: Thu Jun 20 12:09:40 2013 New Revision: 1494948 URL: http://svn.apache.org/r1494948 Log: Fixing 'Frame injection vulnerability in published Javadoc' Modified: cocoon/site/site/2.1/apidocs/index.html cocoon/site/site/2.2/maven-plugins/it-fw/1.0/apidocs/index.html cocoon/site/site/2.2/maven-plugins/maven-plugin/1.0/apidocs/index.html cocoon/site/site/3.0/apidocs/index.html cocoon/site/site/subprojects/servlet-service/servlet-service-impl/apidocs/index.html cocoon/site/site/subprojects/servlet-service/servlet-service-impl/testapidocs/index.html Modified: cocoon/site/site/2.1/apidocs/index.html URL: http://svn.apache.org/viewvc/cocoon/site/site/2.1/apidocs/index.html?rev=1494948&r1=1494947&r2=1494948&view=diff ============================================================================== --- cocoon/site/site/2.1/apidocs/index.html (original) +++ cocoon/site/site/2.1/apidocs/index.html Thu Jun 20 12:09:40 2013 @@ -12,6 +12,42 @@ Cocoon API 2.1.12-dev [March 20 2012] 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: cocoon/site/site/2.2/maven-plugins/it-fw/1.0/apidocs/index.html URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/maven-plugins/it-fw/1.0/apidocs/index.html?rev=1494948&r1=1494947&r2=1494948&view=diff ============================================================================== --- cocoon/site/site/2.2/maven-plugins/it-fw/1.0/apidocs/index.html (original) +++ cocoon/site/site/2.2/maven-plugins/it-fw/1.0/apidocs/index.html Thu Jun 20 12:09:40 2013 @@ -13,6 +13,42 @@ Cocoon Integration Test Framework [maven 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: cocoon/site/site/2.2/maven-plugins/maven-plugin/1.0/apidocs/index.html URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/maven-plugins/maven-plugin/1.0/apidocs/index.html?rev=1494948&r1=1494947&r2=1494948&view=diff ============================================================================== --- cocoon/site/site/2.2/maven-plugins/maven-plugin/1.0/apidocs/index.html (original) +++ cocoon/site/site/2.2/maven-plugins/maven-plugin/1.0/apidocs/index.html Thu Jun 20 12:09:40 2013 @@ -13,6 +13,42 @@ Cocoon Maven Plugin 1.0.2 API 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: cocoon/site/site/3.0/apidocs/index.html URL: http://svn.apache.org/viewvc/cocoon/site/site/3.0/apidocs/index.html?rev=1494948&r1=1494947&r2=1494948&view=diff ============================================================================== --- cocoon/site/site/3.0/apidocs/index.html (original) +++ cocoon/site/site/3.0/apidocs/index.html Thu Jun 20 12:09:40 2013 @@ -13,6 +13,42 @@ Apache Cocoon 3: Parent 3.0.0-beta-1-SNA 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: cocoon/site/site/subprojects/servlet-service/servlet-service-impl/apidocs/index.html URL: http://svn.apache.org/viewvc/cocoon/site/site/subprojects/servlet-service/servlet-service-impl/apidocs/index.html?rev=1494948&r1=1494947&r2=1494948&view=diff ============================================================================== --- cocoon/site/site/subprojects/servlet-service/servlet-service-impl/apidocs/index.html (original) +++ cocoon/site/site/subprojects/servlet-service/servlet-service-impl/apidocs/index.html Thu Jun 20 12:09:40 2013 @@ -13,6 +13,42 @@ Cocoon Servlet Service Implementation 1. 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: cocoon/site/site/subprojects/servlet-service/servlet-service-impl/testapidocs/index.html URL: http://svn.apache.org/viewvc/cocoon/site/site/subprojects/servlet-service/servlet-service-impl/testapidocs/index.html?rev=1494948&r1=1494947&r2=1494948&view=diff ============================================================================== --- cocoon/site/site/subprojects/servlet-service/servlet-service-impl/testapidocs/index.html (original) +++ cocoon/site/site/subprojects/servlet-service/servlet-service-impl/testapidocs/index.html Thu Jun 20 12:09:40 2013 @@ -13,6 +13,42 @@ Cocoon Servlet Service Implementation 1. 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;