admin/controller/common/security.php
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class ControllerCommonSecurity extends Controller {
public function index() {
$this->load->language('common/security');
$data['user_token'] = $this->session->data['user_token'];
$data['storage'] = DIR_SYSTEM . 'storage/';
$path = '';
$data['paths'] = array();
$parts = explode('/', str_replace('\\', '/', rtrim(DIR_SYSTEM, '/')));
foreach ($parts as $part) {
$path .= $part . '/';
$data['paths'][] = $path;
}
rsort($data['paths']);
$data['document_root'] = str_replace('\\', '/', realpath($this->request->server['DOCUMENT_ROOT'] . '/../') . '/');
return $this->load->view('common/security', $data);
}
public function move() {
$this->load->language('common/security');
$json = array();
if ($this->request->post['path']) {
$path = $this->request->post['path'];
} else {
$path = '';
}
if ($this->request->post['directory']) {
$directory = $this->request->post['directory'];
} else {
$directory = '';
}
if (!$this->user->hasPermission('modify', 'common/developer')) {
$json['error'] = $this->language->get('error_permission');
} else {
if (DIR_STORAGE != DIR_SYSTEM . 'storage/') {
$data['error'] = $this->language->get('error_path');
}
if (!$path || str_replace('\\', '/', realpath($path)) . '/' != str_replace('\\', '/', substr(DIR_SYSTEM, 0, strlen($path)))) {
$json['error'] = $this->language->get('error_path');
}
if (!$directory || !preg_match('/^[a-zA-Z0-9_-]+$/', $directory)) {
$json['error'] = $this->language->get('error_directory');
}
后面还有 81 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
