Diff

mod_auth_custom_http/mod_auth_custom_http.lua @ 3989:32d7f05e062f

mod_auth_custom_http: Unlock globals while loading socket.http ltn12 tries to set a global and isn't caught by the require sandboxing. Lua 5.2 issue?
author Matthew Wild <mwild1@gmail.com>
date Thu, 23 Apr 2020 15:39:12 +0100
parent 2867:94d8960385aa
line wrap: on
line diff
--- a/mod_auth_custom_http/mod_auth_custom_http.lua	Wed Apr 22 12:42:42 2020 +0200
+++ b/mod_auth_custom_http/mod_auth_custom_http.lua	Thu Apr 23 15:39:12 2020 +0100
@@ -7,7 +7,9 @@
 
 local new_sasl = require "util.sasl".new;
 local json = require "util.json";
+prosody.unlock_globals();
 local http = require "socket.http";
+prosody.lock_globals();
 
 local options = module:get_option("auth_custom_http");
 local post_url = options and options.post_url;