[Openvpn-devel] [S] Change in openvpn[release/2.5]: Backport stricter check for valid tokens

"razvanc \(Code Review\) via Openvpn-devel" <[email protected]>
Newsgroups net.sourceforge.lists.openvpn-devel
Message-ID <cca7616832769b88eb8cbe4910e64069674c5f0e-EmailReviewComments-HTML@gerrit.openvpn.net>
Attention is currently required from: plaisthos.

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

Change subject: Backport stricter check for valid tokens
......................................................................


Patch Set 1:

(6 comments)

Patchset:

PS1: 
Found a few minor doc / comments mishaps.


Commit Message:

http://gerrit.openvpn.net/c/openvpn/+/1766/comment/4ca12898_8d5a5656?usp=email :
PS1, Line 10: adds a few unit tests.
I don't see any actual unit tests in the code.


File src/openvpn/auth_token.h:

http://gerrit.openvpn.net/c/openvpn/+/1766/comment/152294e2_edfeeab8?usp=email :
PS1, Line 120:  * This function will always read as many bytes as SESSION_ID_PREFIX is longer
"if longer"?


http://gerrit.openvpn.net/c/openvpn/+/1766/comment/5671ea79_2e7d4fa5?usp=email :
PS1, Line 122:  * calling with struct user_pass)
I am not sure this comment continues to be accurate after the change introduced by this patch, since the new implementation now does `strlen(password)`.


File src/openvpn/auth_token.c:

http://gerrit.openvpn.net/c/openvpn/+/1766/comment/4c1daf45_5720bb19?usp=email :
PS1, Line 27: static_assert(AUTH_TOKEN_SESSION_ID_LEN % 3 == 0, "AUTH_TOKEN_SESSION_ID_LEN needs to be multiple a 3");
Typo ("multiple a 3").


http://gerrit.openvpn.net/c/openvpn/+/1766/comment/5e77a2ff_dcc86f93?usp=email :
PS1, Line 39: static_assert(TOKEN_DATA_LEN % 3 == 0, "TOKEN_DATA_BASE64_LEN is not a multiple of 3");
The `static_assert()` tests `TOKEN_DATA_LEN`, but the message says `TOKEN_DATA_BASE64_LEN`.



-- 
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1766?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: release/2.5
Gerrit-Change-Id: I16187153e5b107eb08ccb7c9c9ed4acd6377af0c
Gerrit-Change-Number: 1766
Gerrit-PatchSet: 1
Gerrit-Owner: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-CC: razvanc <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Comment-Date: Thu, 13 Aug 2026 20:07:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.