fix: path add \. rule

This commit is contained in:
sean 2017-07-26 11:34:25 +08:00
parent a486469e02
commit e058da4cf7
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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 {