Przeglądaj źródła

170342-178601 installer.tsの変更

mariko-h 1 miesiąc temu
rodzic
commit
2c4f6bae71
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      apps/app/src/server/service/installer.ts

+ 2 - 0
apps/app/src/server/service/installer.ts

@@ -8,6 +8,7 @@ import path from 'path';
 import loggerFactory from '~/utils/logger';
 
 import type Crowi from '../crowi';
+import { assertFileNameSafeForBaseDir } from '../util/safe-path-utils';
 import { configManager } from './config-manager';
 
 const logger = loggerFactory('growi:service:installer');
@@ -62,6 +63,7 @@ export class InstallerService {
      *   1. avoid creating the same pages
      *   2. avoid difference for order in VRT
      */
+    assertFileNameSafeForBaseDir(lang, localeDir);
     await this.createPage(path.join(localeDir, lang, 'sandbox.md'), '/Sandbox');
     await this.createPage(
       path.join(localeDir, lang, 'sandbox-markdown.md'),