]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
iservice: validate config path case-insensitive
authorHeiko Hund <heiko@ist.eigentlich.net>
Wed, 12 Nov 2025 09:39:05 +0000 (10:39 +0100)
committerGert Doering <gert@greenie.muc.de>
Wed, 12 Nov 2025 10:38:09 +0000 (11:38 +0100)
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 <heiko@ist.eigentlich.net>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
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 <gert@greenie.muc.de>
src/openvpnserv/validate.c

index b3189b775cd63532c46828d5c25372e0f9a4ca22..33815038f27b4b2f96c89cd7577eb0bfd63b304e 100644 (file)
@@ -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;
 }