Browse Source

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

docker-svn
witersen 3 years ago
parent
commit
16838f1d9c
  1. 2
      01.web/src/views/advance/index.vue
  2. 2
      01.web/src/views/login/index.vue
  3. 2
      02.php/app/util/SVNAdmin/Core.php
  4. 24
      02.php/app/util/SVNAdmin/Rep.php
  5. 2
      02.php/config/version.php

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

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

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

@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
<template>
<div class="login">
<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">
<Form
ref="formUserLogin"

2
02.php/app/util/SVNAdmin/Core.php

@ -163,7 +163,7 @@ class Core @@ -163,7 +163,7 @@ class Core
* 等
*
* %s => $repName
* %s => $repPaht str_replace('/', '\/', $repPath)
* %s => $repPaht str_replace(['^', '$', '+', '*', '{', '}', '.', '(', ')', '[', ']', '%', '/'], ['\^', '\$', '\+', '\*', '\{', '\}', '\.', '\(', '\)', '\[', '\]', '\%', '\/'], $repPath)
*
* @var string
*/

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

@ -41,7 +41,7 @@ class Rep extends Core @@ -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])) {
$temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) {
@ -89,7 +89,7 @@ class Rep extends Core @@ -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])) {
$temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) {
@ -138,7 +138,7 @@ class Rep extends Core @@ -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])) {
$temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) {
@ -186,7 +186,7 @@ class Rep extends Core @@ -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])) {
$temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) {
@ -227,7 +227,7 @@ class Rep extends Core @@ -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])) {
$temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) {
@ -302,7 +302,7 @@ class Rep extends Core @@ -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])) {
$temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) {
@ -360,7 +360,7 @@ class Rep extends Core @@ -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])) {
$temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) {
@ -417,7 +417,7 @@ class Rep extends Core @@ -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])) {
$temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) {
@ -491,7 +491,7 @@ class Rep extends Core @@ -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])) {
$temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) {
@ -551,7 +551,7 @@ class Rep extends Core @@ -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])) {
$temp1 = trim($authzContentPreg[1][0]);
if (empty($temp1)) {
@ -610,7 +610,7 @@ class Rep extends Core @@ -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])) {
return '1';
} else {
@ -633,7 +633,7 @@ class Rep extends Core @@ -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])) {
return str_replace($authzContentPreg[0][0], "", $authzContent);
} else {

2
02.php/config/version.php

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

Loading…
Cancel
Save