Skip to contentSkip to conversation

Change in openvpn[master]: iservice: validate config path case-insensitive

Openvpn-devel In review d12fk (Code Review) 2 participants 9 messages Nov 7, 2025 – Nov 12, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1762539795000.I4d905da3add9b8a3daf349eb1bc830a017cf493d@...2715...

#1 lore raw

Attention is currently required from: flichtenheld, plaisthos.

Hello plaisthos, flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1362?usp=email

to review the following change.

Change subject: iservice: validate config path case-insensitive
......................................................................

iservice: validate config path case-insensitive

Windows filesystems do not make a difference here, so should we.

Change-Id I4d905da3add9b8a3daf349eb1bc830a017cf493d

---
M src/openvpnserv/validate.c

1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/62/1362/1

src/openvpnserv/validate.c +1 -1
index b3189b7..3381503 100644
@@ -78,7 +78,7 @@
         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;
 }
 
 

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1362?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4d905da3add9b8a3daf349eb1bc830a017cf493d
Gerrit-Change-Number: 1362
Gerrit-PatchSet: 1
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: d12fk, plaisthos.

flichtenheld has posted comments on this change by d12fk. ( http://gerrit.openvpn.net/c/openvpn/+/1362?usp=email )

Change subject: iservice: validate config path case-insensitive
......................................................................

Patch Set 2:

(1 comment)

Commit Message:

http://gerrit.openvpn.net/c/openvpn/+/1362/comment/724daf9e_538e1abf?usp=email :
PS2, Line 9: Windows filesystems do not make a difference here, so should we.
While I believe that this is a valid meaning of "making a difference" it is not a common one. I would suggest "differentiate". And the "so should we" is confusing.

How about:

```suggestion
Windows filesystems do not differentiate by case, so we shouldn't either.
```

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1362?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4d905da3add9b8a3daf349eb1bc830a017cf493d
Gerrit-Change-Number: 1362
Gerrit-PatchSet: 2
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: d12fk <[email protected]...>
Gerrit-Comment-Date: Mon, 10 Nov 2025 12:04:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

#3 lore raw
In reply to a message not in the archive

Attention is currently required from: d12fk, plaisthos.

Hello flichtenheld, plaisthos,

I'd like you to reexamine a change. Please visit

    http://gerrit.openvpn.net/c/openvpn/+/1362?usp=email

to look at the new patch set (#3).

Change subject: iservice: validate config path case-insensitive
......................................................................

iservice: validate config path case-insensitive

Windows filesystems do not differentiate by case, so we shouldn't either.

Change-Id I4d905da3add9b8a3daf349eb1bc830a017cf493d

---
M src/openvpnserv/validate.c

1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/62/1362/3

src/openvpnserv/validate.c +1 -1
index b3189b7..3381503 100644
@@ -78,7 +78,7 @@
         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;
 }
 
 

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1362?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4d905da3add9b8a3daf349eb1bc830a017cf493d
Gerrit-Change-Number: 1362
Gerrit-PatchSet: 3
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: d12fk <[email protected]...>

#4 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, plaisthos.

d12fk has posted comments on this change by d12fk. ( http://gerrit.openvpn.net/c/openvpn/+/1362?usp=email )

Change subject: iservice: validate config path case-insensitive
......................................................................

Patch Set 3:

(1 comment)

Commit Message:

http://gerrit.openvpn.net/c/openvpn/+/1362/comment/8d911f6a_2b667215?usp=email :
PS2, Line 9: Windows filesystems do not make a difference here, so should we.

Quoted 1 line

While I believe that this is a valid meaning of "making a difference" it is not a common one. […]

Done

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1362?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4d905da3add9b8a3daf349eb1bc830a017cf493d
Gerrit-Change-Number: 1362
Gerrit-PatchSet: 3
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Tue, 11 Nov 2025 01:19:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: flichtenheld <[email protected]...>

#5 lore raw
In reply to a message not in the archive

Attention is currently required from: d12fk, flichtenheld, plaisthos.

stipa has posted comments on this change by d12fk. ( http://gerrit.openvpn.net/c/openvpn/+/1362?usp=email )

Change subject: iservice: validate config path case-insensitive
......................................................................

Patch Set 3: Code-Review+2

(1 comment)

Patchset:

PS3:
LGTM

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1362?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4d905da3add9b8a3daf349eb1bc830a017cf493d
Gerrit-Change-Number: 1362
Gerrit-PatchSet: 3
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: d12fk <[email protected]...>
Gerrit-Comment-Date: Wed, 12 Nov 2025 09:25:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

#6 lore raw

PATCH v3 1/1 iservice: validate config path case-insensitive

In reply to a message not in the archive

From: Heiko Hund <[email protected]...>

Windows filesystems do not differentiate by case, so we shouldn't either.

Change-Id I4d905da3add9b8a3daf349eb1bc830a017cf493d

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1362
---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1362
This mail reflects revision 3 of this Change.

Acked-by according to Gerrit (reflected above):
Lev Stipakov <[email protected]...>

src/openvpnserv/validate.c +1 -1
index b3189b7..3381503 100644
@@ -78,7 +78,7 @@
         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;
 }
 
 
#7 lore raw

[Openvpn-devel] [PATCH applied] Re: iservice: validate config path case-insensitive

Split off #1307 to give proper attribution - thanks for that. This is really important, to give due credits.

The change itself is straightforward and got its +2 already over there ;-)

Your patch has been applied to the master branch.

commit 39581501ebf85336c8219296c6440226947cbe52

Author: Heiko Hund
Date:   Wed Nov 12 10:39:05 2025 +0100
     iservice: validate config path case-insensitive

     Signed-off-by: Heiko Hund <[email protected]...>
     Acked-by: Lev Stipakov <[email protected]...>
     Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1362
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg34340.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#8 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#4) to the change originally created by d12fk. ( http://gerrit.openvpn.net/c/openvpn/+/1362?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by stipa

Change subject: iservice: validate config path case-insensitive
......................................................................

iservice: validate config path case-insensitive

Windows filesystems do not differentiate by case, so we shouldn't either.

Change-Id I4d905da3add9b8a3daf349eb1bc830a017cf493d

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1362
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg34340.html

---
M src/openvpnserv/validate.c

1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/62/1362/4

src/openvpnserv/validate.c +1 -1
index b3189b7..3381503 100644
@@ -78,7 +78,7 @@
         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;
 }
 
 

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1362?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4d905da3add9b8a3daf349eb1bc830a017cf493d
Gerrit-Change-Number: 1362
Gerrit-PatchSet: 4
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>

#9 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1362?usp=email )

Change subject: iservice: validate config path case-insensitive
......................................................................

iservice: validate config path case-insensitive

Windows filesystems do not differentiate by case, so we shouldn't either.

Change-Id I4d905da3add9b8a3daf349eb1bc830a017cf493d

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1362
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg34340.html

---
M src/openvpnserv/validate.c

1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpnserv/validate.c +1 -1
index b3189b7..3381503 100644
@@ -78,7 +78,7 @@
         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;
 }
 
 

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1362?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4d905da3add9b8a3daf349eb1bc830a017cf493d
Gerrit-Change-Number: 1362
Gerrit-PatchSet: 4
Gerrit-Owner: d12fk <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>