Diff

util/sasl/oauthbearer.lua @ 496:c4ae7aa2958a

util.sasl.oauthbearer: Fix message syntax Each key-value pair has a \001 trailer, and then the whole thing has a \001 trailer as well, so it should always end with two \001.
author Kim Alvefur <zash@zash.se>
date Fri, 23 Jun 2023 10:11:25 +0200
parent 477:b0a8d4e9934e
child 498:50d0bd035bb7
line wrap: on
line diff
--- a/util/sasl/oauthbearer.lua	Wed Jun 21 21:03:05 2023 +0200
+++ b/util/sasl/oauthbearer.lua	Fri Jun 23 10:11:25 2023 +0200
@@ -3,7 +3,7 @@
 	if name == "OAUTHBEARER" and stream.username then
 		return function (stream)
 			local auth = stream.bearer_token and ("Bearer "..stream.bearer_token) or "";
-			local message, data = coroutine.yield("n,a="..stream.username.."@"..stream.host..",\001auth="..auth.."\001");
+			local message, data = coroutine.yield("n,a="..stream.username.."@"..stream.host..",\001auth="..auth.."\001\001");
 			if message == "success" then
 				return true;
 			elseif message == "challenge" then