Skip to content

Commit 10625ce

Browse files
committed
chore: что бы тесты не падали
1 parent 27ef741 commit 10625ce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/src/core/utils/botImport.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function assertSafeUsername(username) {
3535
}
3636

3737
function resolveSafePluginDir(botPluginsDir, pluginName) {
38-
if (typeof pluginName !== 'string' || pluginName.length === 0 || pluginName.includes('\0')) {
38+
if (typeof pluginName !== 'string' || pluginName.length === 0 || pluginName.includes('\0') || pluginName.includes('\\')) {
3939
throw httpError(`Недопустимое имя плагина: ${pluginName}`, 400);
4040
}
4141
const root = path.resolve(botPluginsDir);

0 commit comments

Comments
 (0)