You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whirr.apache.org by to...@apache.org on 2013/07/04 10:53:02 UTC

svn commit: r1499687 - in /whirr/site/production/docs: 0.8.1/apidocs/index.html 0.8.2/apidocs/index.html

Author: tomwhite
Date: Thu Jul  4 08:53:02 2013
New Revision: 1499687

URL: http://svn.apache.org/r1499687
Log:
Repair javadoc files in place for CVE-2013-1571.

Modified:
    whirr/site/production/docs/0.8.1/apidocs/index.html
    whirr/site/production/docs/0.8.2/apidocs/index.html

Modified: whirr/site/production/docs/0.8.1/apidocs/index.html
URL: http://svn.apache.org/viewvc/whirr/site/production/docs/0.8.1/apidocs/index.html?rev=1499687&r1=1499686&r2=1499687&view=diff
==============================================================================
--- whirr/site/production/docs/0.8.1/apidocs/index.html (original)
+++ whirr/site/production/docs/0.8.1/apidocs/index.html Thu Jul  4 08:53:02 2013
@@ -13,6 +13,42 @@ Whirr 0.8.1 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: whirr/site/production/docs/0.8.2/apidocs/index.html
URL: http://svn.apache.org/viewvc/whirr/site/production/docs/0.8.2/apidocs/index.html?rev=1499687&r1=1499686&r2=1499687&view=diff
==============================================================================
--- whirr/site/production/docs/0.8.2/apidocs/index.html (original)
+++ whirr/site/production/docs/0.8.2/apidocs/index.html Thu Jul  4 08:53:02 2013
@@ -13,6 +13,42 @@ Whirr 0.8.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;