summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-06-04 21:17:59 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-08-23 21:52:26 +0200
commit2a5c998d4cdfd54ba65b93318292dab542beaabd (patch)
treeb5670906c4b864704142cda9cbd1fef2fd8d3ceb /tools/source
parent31d2e0e7b431285b11455a321845371411c09795 (diff)
allow an exemption to be made for a specific host
Change-Id: Ie423df7839e793a9c07561efb56d5649876947ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168826 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172328 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/inet/hostfilter.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/source/inet/hostfilter.cxx b/tools/source/inet/hostfilter.cxx
index 5bc63d42cfb7..e13e3d66cab6 100644
--- a/tools/source/inet/hostfilter.cxx
+++ b/tools/source/inet/hostfilter.cxx
@@ -11,6 +11,7 @@
#include <regex>
static std::regex g_AllowedHostsRegex("");
+static OUString g_ExceptVerifyHost;
static bool g_AllowedHostsSet = false;
void HostFilter::setAllowedHostsRegex(const char* sAllowedRegex)
@@ -28,4 +29,14 @@ bool HostFilter::isForbidden(const OUString& rHost)
return !std::regex_match(rHost.toUtf8().getStr(), g_AllowedHostsRegex);
}
+void HostFilter::setExemptVerifyHost(const OUString& rExemptVerifyHost)
+{
+ g_ExceptVerifyHost = rExemptVerifyHost;
+}
+
+bool HostFilter::isExemptVerifyHost(const std::u16string_view rHost)
+{
+ return rHost == g_ExceptVerifyHost;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */