Browse Source

v2.3.3发布,修复文件或文件夹中存在特殊字符时造成的权限配置失效问题

master v2.3.3
witersen 3 years ago
parent
commit
6ea91af705
  1. 2
      01.web/src/views/advance/index.vue
  2. 2
      01.web/src/views/login/index.vue
  3. 24
      02.php/app/util/SVNAdmin/Rep.php
  4. 2
      02.php/config/version.php
  5. 2
      README.md

2
01.web/src/views/advance/index.vue

@ -597,7 +597,7 @@ export default {
* 版本信息 * 版本信息
*/ */
version: { version: {
current_verson: "2.3.2", current_verson: "2.3.3",
php_version: "5.5 <= PHP < 8.0", php_version: "5.5 <= PHP < 8.0",
database: "MYSQL、SQLite", database: "MYSQL、SQLite",
github: "https://github.com/witersen/SvnAdminV2.0", github: "https://github.com/witersen/SvnAdminV2.0",

2
01.web/src/views/login/index.vue

@ -5,7 +5,7 @@
<template> <template>
<div class="login"> <div class="login">
<div class="login-con"> <div class="login-con">
<Card icon="log-in" title="SVNAdmin V2.3.2" :bordered="false"> <Card icon="log-in" title="SVNAdmin V2.3.3" :bordered="false">
<div class="form-con"> <div class="form-con">
<Form <Form
ref="formUserLogin" ref="formUserLogin"

24
02.php/app/util/SVNAdmin/Rep.php

@ -41,7 +41,7 @@ class Rep extends Core
} }
} }
preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace('/', '\/', $repPath)), $authzContent, $authzContentPreg); preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace(['^', '$', '+', '*', '{', '}', '.', '(', ')', '[', ']', '%', '/'], ['\^', '\$', '\+', '\*', '\{', '\}', '\.', '\(', '\)', '\[', '\]', '\%', '\/'], $repPath)), $authzContent, $authzContentPreg);
if (array_key_exists(0, $authzContentPreg[0])) { if (array_key_exists(0, $authzContentPreg[0])) {
$temp1 = trim($authzContentPreg[1][0]); $temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) { if (empty($temp1)) {
@ -89,7 +89,7 @@ class Rep extends Core
} }
} }
preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace('/', '\/', $repPath)), $authzContent, $authzContentPreg); preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace(['^', '$', '+', '*', '{', '}', '.', '(', ')', '[', ']', '%', '/'], ['\^', '\$', '\+', '\*', '\{', '\}', '\.', '\(', '\)', '\[', '\]', '\%', '\/'], $repPath)), $authzContent, $authzContentPreg);
if (array_key_exists(0, $authzContentPreg[0])) { if (array_key_exists(0, $authzContentPreg[0])) {
$temp1 = trim($authzContentPreg[1][0]); $temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) { if (empty($temp1)) {
@ -138,7 +138,7 @@ class Rep extends Core
} }
} }
preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace('/', '\/', $repPath)), $authzContent, $authzContentPreg); preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace(['^', '$', '+', '*', '{', '}', '.', '(', ')', '[', ']', '%', '/'], ['\^', '\$', '\+', '\*', '\{', '\}', '\.', '\(', '\)', '\[', '\]', '\%', '\/'], $repPath)), $authzContent, $authzContentPreg);
if (array_key_exists(0, $authzContentPreg[0])) { if (array_key_exists(0, $authzContentPreg[0])) {
$temp1 = trim($authzContentPreg[1][0]); $temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) { if (empty($temp1)) {
@ -186,7 +186,7 @@ class Rep extends Core
} }
} }
preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace('/', '\/', $repPath)), $authzContent, $authzContentPreg); preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace(['^', '$', '+', '*', '{', '}', '.', '(', ')', '[', ']', '%', '/'], ['\^', '\$', '\+', '\*', '\{', '\}', '\.', '\(', '\)', '\[', '\]', '\%', '\/'], $repPath)), $authzContent, $authzContentPreg);
if (array_key_exists(0, $authzContentPreg[0])) { if (array_key_exists(0, $authzContentPreg[0])) {
$temp1 = trim($authzContentPreg[1][0]); $temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) { if (empty($temp1)) {
@ -227,7 +227,7 @@ class Rep extends Core
} }
} }
preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace('/', '\/', $repPath)), $authzContent, $authzContentPreg); preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace(['^', '$', '+', '*', '{', '}', '.', '(', ')', '[', ']', '%', '/'], ['\^', '\$', '\+', '\*', '\{', '\}', '\.', '\(', '\)', '\[', '\]', '\%', '\/'], $repPath)), $authzContent, $authzContentPreg);
if (array_key_exists(0, $authzContentPreg[0])) { if (array_key_exists(0, $authzContentPreg[0])) {
$temp1 = trim($authzContentPreg[1][0]); $temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) { if (empty($temp1)) {
@ -302,7 +302,7 @@ class Rep extends Core
} }
} }
preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace('/', '\/', $repPath)), $authzContent, $authzContentPreg); preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace(['^', '$', '+', '*', '{', '}', '.', '(', ')', '[', ']', '%', '/'], ['\^', '\$', '\+', '\*', '\{', '\}', '\.', '\(', '\)', '\[', '\]', '\%', '\/'], $repPath)), $authzContent, $authzContentPreg);
if (array_key_exists(0, $authzContentPreg[0])) { if (array_key_exists(0, $authzContentPreg[0])) {
$temp1 = trim($authzContentPreg[1][0]); $temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) { if (empty($temp1)) {
@ -360,7 +360,7 @@ class Rep extends Core
} }
} }
preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace('/', '\/', $repPath)), $authzContent, $authzContentPreg); preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace(['^', '$', '+', '*', '{', '}', '.', '(', ')', '[', ']', '%', '/'], ['\^', '\$', '\+', '\*', '\{', '\}', '\.', '\(', '\)', '\[', '\]', '\%', '\/'], $repPath)), $authzContent, $authzContentPreg);
if (array_key_exists(0, $authzContentPreg[0])) { if (array_key_exists(0, $authzContentPreg[0])) {
$temp1 = trim($authzContentPreg[1][0]); $temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) { if (empty($temp1)) {
@ -417,7 +417,7 @@ class Rep extends Core
} }
} }
preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace('/', '\/', $repPath)), $authzContent, $authzContentPreg); preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace(['^', '$', '+', '*', '{', '}', '.', '(', ')', '[', ']', '%', '/'], ['\^', '\$', '\+', '\*', '\{', '\}', '\.', '\(', '\)', '\[', '\]', '\%', '\/'], $repPath)), $authzContent, $authzContentPreg);
if (array_key_exists(0, $authzContentPreg[0])) { if (array_key_exists(0, $authzContentPreg[0])) {
$temp1 = trim($authzContentPreg[1][0]); $temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) { if (empty($temp1)) {
@ -491,7 +491,7 @@ class Rep extends Core
} }
} }
preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace('/', '\/', $repPath)), $authzContent, $authzContentPreg); preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace(['^', '$', '+', '*', '{', '}', '.', '(', ')', '[', ']', '%', '/'], ['\^', '\$', '\+', '\*', '\{', '\}', '\.', '\(', '\)', '\[', '\]', '\%', '\/'], $repPath)), $authzContent, $authzContentPreg);
if (array_key_exists(0, $authzContentPreg[0])) { if (array_key_exists(0, $authzContentPreg[0])) {
$temp1 = trim($authzContentPreg[1][0]); $temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) { if (empty($temp1)) {
@ -551,7 +551,7 @@ class Rep extends Core
} }
} }
preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace('/', '\/', $repPath)), $authzContent, $authzContentPreg); preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace(['^', '$', '+', '*', '{', '}', '.', '(', ')', '[', ']', '%', '/'], ['\^', '\$', '\+', '\*', '\{', '\}', '\.', '\(', '\)', '\[', '\]', '\%', '\/'], $repPath)), $authzContent, $authzContentPreg);
if (array_key_exists(0, $authzContentPreg[0])) { if (array_key_exists(0, $authzContentPreg[0])) {
$temp1 = trim($authzContentPreg[1][0]); $temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) { if (empty($temp1)) {
@ -610,7 +610,7 @@ class Rep extends Core
} }
} }
preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITHOUT_CON, $repName, str_replace('/', '\/', $repPath)), $authzContent, $authzContentPreg); preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITHOUT_CON, $repName, str_replace(['^', '$', '+', '*', '{', '}', '.', '(', ')', '[', ']', '%', '/'], ['\^', '\$', '\+', '\*', '\{', '\}', '\.', '\(', '\)', '\[', '\]', '\%', '\/'], $repPath)), $authzContent, $authzContentPreg);
if (array_key_exists(0, $authzContentPreg[0])) { if (array_key_exists(0, $authzContentPreg[0])) {
return '1'; return '1';
} else { } else {
@ -633,7 +633,7 @@ class Rep extends Core
} }
} }
preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace('/', '\/', $repPath)), $authzContent, $authzContentPreg); preg_match_all(sprintf($this->REG_AUTHZ_REP_SPECIAL_PATH_WITH_CON, $repName, str_replace(['^', '$', '+', '*', '{', '}', '.', '(', ')', '[', ']', '%', '/'], ['\^', '\$', '\+', '\*', '\{', '\}', '\.', '\(', '\)', '\[', '\]', '\%', '\/'], $repPath)), $authzContent, $authzContentPreg);
if (array_key_exists(0, $authzContentPreg[0])) { if (array_key_exists(0, $authzContentPreg[0])) {
return str_replace($authzContentPreg[0][0], "", $authzContent); return str_replace($authzContentPreg[0][0], "", $authzContent);
} else { } else {

2
02.php/config/version.php

@ -12,5 +12,5 @@
* 用户请不要自行修改 以免影响后续升级检测 * 用户请不要自行修改 以免影响后续升级检测
*/ */
return [ return [
'version' => '2.3.2' 'version' => '2.3.3'
]; ];

2
README.md

@ -194,7 +194,7 @@ php svnadmin.php console
docker cp svnadmintemp:/home/svnadmin ./ docker cp svnadmintemp:/home/svnadmin ./
#停止并删除临时容器 #停止并删除临时容器
dockeer stop svnadmintemp && docker rm svnadmintemp docker stop svnadmintemp && docker rm svnadmintemp
#启动正式容器 #启动正式容器
docker run -d -p 80:80 -p 3690:3690 -v /home/svnadmin/:/home/svnadmin/ --privileged witersencom/svnadmin:2.3.2 docker run -d -p 80:80 -p 3690:3690 -v /home/svnadmin/:/home/svnadmin/ --privileged witersencom/svnadmin:2.3.2

Loading…
Cancel
Save