mod_auth_oauth_external: Also do XEP-0106 escaping in SASL OAUTHBEARER
authorKim Alvefur <zash@zash.se>
Wed, 10 May 2023 19:33:37 +0200
changeset 5447 4e79f344ae2f
parent 5446 7480dde4cd2e
child 5448 0c7abc81c243
mod_auth_oauth_external: Also do XEP-0106 escaping in SASL OAUTHBEARER For consistency. The mangling should be made configurable in the future.
mod_auth_oauth_external/mod_auth_oauth_external.lua
--- a/mod_auth_oauth_external/mod_auth_oauth_external.lua	Wed May 10 19:11:25 2023 +0200
+++ b/mod_auth_oauth_external/mod_auth_oauth_external.lua	Wed May 10 19:33:37 2023 +0200
@@ -127,7 +127,7 @@
 				return false, nil, nil;
 			end
 
-			return response[username_field], true, response;
+			return jid.escape(response[username_field]), true, response;
 		end
 	end
 	return sasl.new(host, profile);