From c11d121c0635f44404e9f3e784190e898609b876 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 16 Mar 2023 13:57:30 +0100 Subject: util.sasl.{scram,plain}: Pass authzid to SASL profile callback For potential future use. Used for logging into a different account than the one used for authentication. --- util/sasl/plain.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/sasl/plain.lua') diff --git a/util/sasl/plain.lua b/util/sasl/plain.lua index 43a66c5b..9b0341e6 100644 --- a/util/sasl/plain.lua +++ b/util/sasl/plain.lua @@ -69,10 +69,10 @@ local function plain(self, message) local correct, state = false, false; if self.profile.plain then local correct_password; - correct_password, state = self.profile.plain(self, authentication, self.realm); + correct_password, state = self.profile.plain(self, authentication, self.realm, authorization); correct = (saslprep(correct_password) == password); elseif self.profile.plain_test then - correct, state = self.profile.plain_test(self, authentication, password, self.realm); + correct, state = self.profile.plain_test(self, authentication, password, self.realm, authorization); end if state == false then -- cgit v1.2.3