mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-18 13:04:46 +08:00
fix: path add \. rule
This commit is contained in:
parent
a486469e02
commit
e058da4cf7
@ -141,7 +141,7 @@ exports.filterRes = (list, rules) => {
|
||||
}
|
||||
|
||||
exports.verifyPath = (path) => {
|
||||
if (/^\/[a-zA-Z0-9\-\/_:]+$/.test(path)) {
|
||||
if (/^\/[a-zA-Z0-9\-\/_:\.]+$/.test(path)) {
|
||||
if (path[path.length - 1] === '/') {
|
||||
return false;
|
||||
} else {
|
||||
|
@ -162,7 +162,7 @@ exports.filterRes = function (list, rules) {
|
||||
};
|
||||
|
||||
exports.verifyPath = function (path) {
|
||||
if (/^\/[a-zA-Z0-9\-\/_:]+$/.test(path)) {
|
||||
if (/^\/[a-zA-Z0-9\-\/_:\.]+$/.test(path)) {
|
||||
if (path[path.length - 1] === '/') {
|
||||
return false;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user