File

util/xpcall.lua @ 13381:b7dc45d704fa

mod_saslauth: Fire event at start of authentication attempt As extension point for rate limiting and similar checks, so they can hook a single event instead of <{sasl1}auth> or stream features, which might not be fired in case of SASL2 or e.g. HTTP based login.
author Kim Alvefur <zash@zash.se>
date Fri, 01 Dec 2023 23:43:18 +0100
parent 12975:d10957394a3c
line wrap: on
line source

local xpcall = xpcall;

if select(2, xpcall(function (x) return x end, function () end,  "test")) ~= "test" then
	xpcall = require"prosody.util.compat".xpcall;
end

return {
	xpcall = xpcall;
};