1.修复上传漏洞和SQL注入漏洞-移除安装模块所有的代码
This commit is contained in:
@@ -279,30 +279,13 @@ class Terminal
|
||||
$this->output('Build succeeded, but move file failed. Please operate manually.');
|
||||
return false;
|
||||
}
|
||||
} elseif ($commandPKey == 'web-install' && $this->extend && class_exists(\app\admin\library\module\Manage::class)) {
|
||||
[$type, $value] = explode(':', $this->extend);
|
||||
if ($type == 'module-install' && $value) {
|
||||
\app\admin\library\module\Manage::instance($value)->dependentInstallComplete('npm');
|
||||
}
|
||||
} elseif ($commandPKey == 'composer' && $this->extend && class_exists(\app\admin\library\module\Manage::class)) {
|
||||
[$type, $value] = explode(':', $this->extend);
|
||||
if ($type == 'module-install' && $value) {
|
||||
\app\admin\library\module\Manage::instance($value)->dependentInstallComplete('composer');
|
||||
}
|
||||
} elseif ($commandPKey == 'nuxt-install' && $this->extend && class_exists(\app\admin\library\module\Manage::class)) {
|
||||
[$type, $value] = explode(':', $this->extend);
|
||||
if ($type == 'module-install' && $value) {
|
||||
\app\admin\library\module\Manage::instance($value)->dependentInstallComplete('nuxt_npm');
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function beforeExecution(): void
|
||||
{
|
||||
if ($this->commandKey == 'test.pnpm') {
|
||||
@unlink(root_path() . 'public' . DIRECTORY_SEPARATOR . 'npm-install-test' . DIRECTORY_SEPARATOR . 'pnpm-lock.yaml');
|
||||
} elseif ($this->commandKey == 'web-install.pnpm') {
|
||||
if ($this->commandKey == 'web-install.pnpm') {
|
||||
@unlink(root_path() . 'web' . DIRECTORY_SEPARATOR . 'pnpm-lock.yaml');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user