From: Heiko Hund Date: Wed, 12 Nov 2025 09:39:05 +0000 (+0100) Subject: iservice: validate config path case-insensitive X-Git-Tag: v2.7_rc2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39581501ebf85336c8219296c6440226947cbe52;p=thirdparty%2Fopenvpn.git iservice: validate config path case-insensitive Windows filesystems do not differentiate by case, so we shouldn't either. Reported-by: stephan@srlabs.de Change-Id: I4d905da3add9b8a3daf349eb1bc830a017cf493d Signed-off-by: Heiko Hund Acked-by: Lev Stipakov Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1362 Message-Id: <20251112093911.24196-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34340.html Signed-off-by: Gert Doering --- diff --git a/src/openvpnserv/validate.c b/src/openvpnserv/validate.c index b3189b775..33815038f 100644 --- a/src/openvpnserv/validate.c +++ b/src/openvpnserv/validate.c @@ -78,7 +78,7 @@ CheckConfigPath(const WCHAR *workdir, const WCHAR *fname, const settings_t *s) res = PathCchCanonicalize(config_path, _countof(config_path), fname); } - return res == S_OK && wcsncmp(config_path, s->config_dir, wcslen(s->config_dir)) == 0; + return res == S_OK && wcsnicmp(config_path, s->config_dir, wcslen(s->config_dir)) == 0; }