mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-01-26 05:27:29 +02:00
new dovecout lua auth - use https
This commit is contained in:
parent
1aeb36d40e
commit
1c73a16ca0
@ -34,6 +34,7 @@ RUN addgroup -g 5000 vmail \
|
||||
icu-data-full \
|
||||
mariadb-connector-c \
|
||||
gcompat \
|
||||
lua-sec \
|
||||
mariadb-client \
|
||||
perl \
|
||||
perl-ntlm \
|
||||
|
@ -136,8 +136,8 @@ function auth_password_verify(request, password)
|
||||
|
||||
json = require "json"
|
||||
ltn12 = require "ltn12"
|
||||
http = require "socket.http"
|
||||
http.TIMEOUT = 5
|
||||
https = require "ssl.https"
|
||||
https.TIMEOUT = 5
|
||||
mysql = require "luasql.mysql"
|
||||
env = mysql.mysql()
|
||||
con = env:connect("__DBNAME__","__DBUSER__","__DBPASS__","localhost")
|
||||
@ -150,7 +150,7 @@ function auth_password_verify(request, password)
|
||||
local res = {}
|
||||
|
||||
-- check against mailbox passwds
|
||||
local b, c = http.request {
|
||||
local b, c = https.request {
|
||||
method = "POST",
|
||||
url = "https://nginx/api/v1/process/login",
|
||||
source = ltn12.source.string(req_json),
|
||||
@ -181,7 +181,7 @@ function auth_password_verify(request, password)
|
||||
req.protocol.ignore_hasaccess = true
|
||||
end
|
||||
|
||||
local b, c = http.request {
|
||||
local b, c = https.request {
|
||||
method = "POST",
|
||||
url = "https://nginx/api/v1/process/login",
|
||||
source = ltn12.source.string(req_json),
|
||||
|
Loading…
x
Reference in New Issue
Block a user