]> git.feebdaed.xyz Git - 0xmirror/openvpn.git/commit
iservice: validate config path better
authorHeiko Hund <heiko@ist.eigentlich.net>
Wed, 12 Nov 2025 09:22:38 +0000 (10:22 +0100)
committerGert Doering <gert@greenie.muc.de>
Wed, 12 Nov 2025 10:02:32 +0000 (11:02 +0100)
commitbbca8141ebf86423026f3867eca892fe82880a68
tree5ecb033d6f5b88895deea8259c8142de18e35054
parent5888adc6fa86ae6ec718c76f733733c8b9fbd38b
iservice: validate config path better

Instead of just rejecting any path that contains ".." use some WIN32 API
functions to combine, canonicalize and then check if the resulting
path is located under the config directory. Makes the code prettier
and more correct.

Change-Id: I0e94068f467f2899daf133b032a785d2d7fc05e4
Signed-off-by: Heiko Hund <heiko@ist.eigentlich.net>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1307
Message-Id: <20251112092244.22764-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34336.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpnserv/validate.c