|
@@ -100,6 +100,7 @@ const restrictedPatternsToCreate: Array<RegExp> = [
|
|
|
/(\/\.\.)\/?/, // see: https://github.com/weseek/growi/issues/3582
|
|
/(\/\.\.)\/?/, // see: https://github.com/weseek/growi/issues/3582
|
|
|
/^\/(_search|_private-legacy-pages)(\/.*|$)/,
|
|
/^\/(_search|_private-legacy-pages)(\/.*|$)/,
|
|
|
/^\/(installer|register|login|logout|admin|me|files|trash|paste|comments|tags|share)(\/.*|$)/,
|
|
/^\/(installer|register|login|logout|admin|me|files|trash|paste|comments|tags|share)(\/.*|$)/,
|
|
|
|
|
+ /^\/user\/[^/]+$/, // see: https://regex101.com/r/utVQct/1
|
|
|
];
|
|
];
|
|
|
export const isCreatablePage = (path: string): boolean => {
|
|
export const isCreatablePage = (path: string): boolean => {
|
|
|
return !restrictedPatternsToCreate.some(pattern => path.match(pattern));
|
|
return !restrictedPatternsToCreate.some(pattern => path.match(pattern));
|