You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by rf...@apache.org on 2013/06/24 17:27:22 UTC

svn commit: r1496094 [2/2] - in /lenya/site/apidocs: 1.2/ 2.0/ 2.0/modules/ac-impl/ 2.0/modules/ac/ 2.0/modules/acusecases/ 2.0/modules/administration/ 2.0/modules/blog/ 2.0/modules/cache/ 2.0/modules/cforms/ 2.0/modules/collection/ 2.0/modules/contact...

Modified: lenya/site/apidocs/2.0/modules/webdav/index.html
URL: http://svn.apache.org/viewvc/lenya/site/apidocs/2.0/modules/webdav/index.html?rev=1496094&r1=1496093&r2=1496094&view=diff
==============================================================================
--- lenya/site/apidocs/2.0/modules/webdav/index.html (original)
+++ lenya/site/apidocs/2.0/modules/webdav/index.html Mon Jun 24 15:27:21 2013
@@ -12,6 +12,42 @@ Apache Lenya API - Version 2.0
         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: lenya/site/apidocs/2.0/modules/workflow-impl/index.html
URL: http://svn.apache.org/viewvc/lenya/site/apidocs/2.0/modules/workflow-impl/index.html?rev=1496094&r1=1496093&r2=1496094&view=diff
==============================================================================
--- lenya/site/apidocs/2.0/modules/workflow-impl/index.html (original)
+++ lenya/site/apidocs/2.0/modules/workflow-impl/index.html Mon Jun 24 15:27:21 2013
@@ -10,6 +10,42 @@ Apache Lenya API - Version 1.4-dev
     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: lenya/site/apidocs/2.0/modules/workflow/index.html
URL: http://svn.apache.org/viewvc/lenya/site/apidocs/2.0/modules/workflow/index.html?rev=1496094&r1=1496093&r2=1496094&view=diff
==============================================================================
--- lenya/site/apidocs/2.0/modules/workflow/index.html (original)
+++ lenya/site/apidocs/2.0/modules/workflow/index.html Mon Jun 24 15:27:21 2013
@@ -12,6 +12,42 @@ Apache Lenya API - Version 2.0
         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;



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org