NaokiHigashi28 1 год назад
Родитель
Сommit
062998e310

+ 4 - 1
apps/app/src/features/growi-plugin/server/services/growi-plugin/growi-plugin.ts

@@ -435,7 +435,10 @@ export class GrowiPluginService implements IGrowiPluginService {
   private joinAndValidatePath(baseDir: string, ...paths: string[]):fs.PathLike {
     const joinedPath = path.join(baseDir, ...paths);
     if (!joinedPath.startsWith(baseDir)) {
-      throw new Error(`Invalid path: Outside of allowed directory - ${joinedPath}`);
+      throw new Error(
+        'Invalid plugin path detected! Access outside of the allowed directory is not permitted.'
+        + `\nAttempted Path: ${joinedPath}`,
+      );
     }
     return joinedPath;
   }