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