Browse Source

Add check for validation playground id

Gary Hsu 7 năm trước cách đây
mục cha
commit
03a276471a
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      tests/validation/validation.js

+ 6 - 0
tests/validation/validation.js

@@ -217,6 +217,12 @@ function runTest(index, done) {
             });
     }
     else if (test.playgroundId) {
+        if (test.playgroundId[0] !== "#" || test.playgroundId.indexOf("#", 1) === -1) {
+            console.error("Invalid playground id");
+            done(false);
+            return;
+        }
+
         var snippetUrl = "//babylonjs-api2.azurewebsites.net/snippets";
         var pgRoot = "/Playground"
         var xmlHttp = new XMLHttpRequest();