reiji-h 1 год назад
Родитель
Сommit
ef8978dd3b
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      packages/core/src/utils/page-path-utils/index.ts

+ 2 - 1
packages/core/src/utils/page-path-utils/index.ts

@@ -117,9 +117,10 @@ const restrictedPatternsToCreate: Array<RegExp> = [
   /^\/(_search|_private-legacy-pages)(\/.*|$)/,
   /^\/(installer|register|login|logout|admin|me|files|trash|paste|comments|tags|share|attachment)(\/.*|$)/,
   /^\/user(?:\/[^/]+)?$/, // https://regex101.com/r/9Eh2S1/1
+  /^(\/.+){500,}$/, // avoid deep layer path. see: https://regex101.com/r/s9cCdf/1
 ];
 export const isCreatablePage = (path: string): boolean => {
-  return !restrictedPatternsToCreate.some(pattern => path.match(pattern)) && path.length <= 2_000_000;
+  return !restrictedPatternsToCreate.some(pattern => path.match(pattern));
 };
 
 /**