From a012d9711a9a3a0c20ed29692813a4416f0cbb2a Mon Sep 17 00:00:00 2001 From: Vlad Khorsun Date: Sun, 28 Apr 2024 13:54:27 +0300 Subject: [PATCH] Implement #8066 : Make protocol schemes case-insensitive. --- src/common/isc_file.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/isc_file.cpp b/src/common/isc_file.cpp index 10222ac6b6..4c15b524aa 100644 --- a/src/common/isc_file.cpp +++ b/src/common/isc_file.cpp @@ -405,7 +405,11 @@ bool ISC_analyze_protocol(const char* protocol, tstring& expanded_name, tstring& node_name.erase(); const PathName prefix = PathName(protocol) + "://"; - if (expanded_name.find(prefix) != 0) + + if (prefix.length() > expanded_name.length()) + return false; + + if (IgnoreCaseComparator::compare(prefix.c_str(), expanded_name.c_str(), prefix.length()) != 0) return false; PathName savedName = expanded_name;