Skip to content

Commit

Permalink
BUG修复:修复了检验会将获取源列表请求(字符串为空)判断为不合法的问题;
Browse files Browse the repository at this point in the history
描述更正:实际检验规则是("^[a-zA-Z0-9_.-]+$")支持字母、数字、”. "、”-“
  • Loading branch information
KOROyo123 committed Jun 5, 2024
1 parent 1a3260d commit 9f36cd2
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,10 @@ int ntrip_compat_listener::erase_and_free_bev(bufferevent *bev, std::string Conn

bool ntrip_compat_listener::check_mount_is_valid(const std::string &str)
{
if(str.empty()) //针对获取源列表的情况
{
return true;
}
// 定义一个正则表达式,匹配仅由大小写字母、数字和下划线组成的字符串
std::regex pattern("^[a-zA-Z0-9_.-]+$");
// 使用 std::regex_match 进行匹配检查
Expand Down

0 comments on commit 9f36cd2

Please sign in to comment.