From 22e3872cd48c45eb0edf0e6d52483880fdf7cbe6 Mon Sep 17 00:00:00 2001 From: xia-chu <771730766@qq.com> Date: Wed, 26 Jul 2023 16:45:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96ip=E8=BF=87=E6=BB=A4=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Http/HttpFileManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/HttpFileManager.cpp b/src/Http/HttpFileManager.cpp index a6d7b756..fcf61f37 100644 --- a/src/Http/HttpFileManager.cpp +++ b/src/Http/HttpFileManager.cpp @@ -93,8 +93,8 @@ bool HttpFileManager::isIPAllowed(const std::string &ip) { if (allow_ip_range.empty()) { return true; } + auto ip_int = get_ip_uint64(ip); for (auto &range : allow_ip_range) { - auto ip_int = get_ip_uint64(ip); if (ip_int >= range.first && ip_int <= range.second) { return true; }