Message ID | 20200326172332.2356-2-arne@rfc2549.org |
---|---|
State | Accepted |
Headers | show |
Series | [Openvpn-devel,1/3,Auth-token] Fix session id and initial timestamp not begin preserved | expand |
Your patch has been applied to the master branch. Haven't actually tested this in any server setup - but "this is your code, if you say this is the way it needs to be, it is, the explanation makes sense and the code change matches". An all other occurences use strlen() as well... So, Acked-by: Gert Doering <gert@greenie.muc.de> commit 42fe3e8175822a4cf2c85cc4ce3fdffd41d74455 Author: Arne Schwabe Date: Thu Mar 26 18:23:31 2020 +0100 Fix session id in env missing first byte Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20200326172332.2356-2-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19622.html Signed-off-by: Gert Doering <gert@greenie.muc.de> -- kind regards, Gert Doering
diff --git a/src/openvpn/auth_token.c b/src/openvpn/auth_token.c index 6275299d..585679dc 100644 --- a/src/openvpn/auth_token.c +++ b/src/openvpn/auth_token.c @@ -121,7 +121,7 @@ add_session_token_env(struct tls_session *session, struct tls_multi *multi, */ char session_id[AUTH_TOKEN_SESSION_ID_LEN*2] = {0}; - memcpy(session_id, session_id_source + sizeof(SESSION_ID_PREFIX), + memcpy(session_id, session_id_source + strlen(SESSION_ID_PREFIX), AUTH_TOKEN_SESSION_ID_LEN*8/6); setenv_str(session->opt->es, "session_id", session_id);