Procházet zdrojové kódy

[Fix] First load selector_map and path_map. And only return false when domain not found if try_fallback is false

tags/1.7.0
Jean-Louis Dupond před 6 roky
rodič
revize
86693e995a
1 změnil soubory, kde provedl 14 přidání a 12 odebrání
  1. 14
    12
      lualib/dkim_sign_tools.lua

+ 14
- 12
lualib/dkim_sign_tools.lua Zobrazit soubor

@@ -156,21 +156,12 @@ local function prepare_dkim_signing(N, task, settings)
end
end

if not p.key then
if not settings.use_redis then
p.key = settings.path
end
end

if not p.selector then
p.selector = settings.selector
end
p.domain = dkim_domain

if not p.selector and settings.selector_map then
local data = settings.selector_map:get_key(dkim_domain)
if data then
p.selector = data
elseif not settings.try_fallback then
return false,{}
end
end

@@ -178,11 +169,22 @@ local function prepare_dkim_signing(N, task, settings)
local data = settings.path_map:get_key(dkim_domain)
if data then
p.key = data
else
elseif not settings.try_fallback then
return false,{}
end
end

if not p.key then
if not settings.use_redis then
p.key = settings.path
end
end

if not p.selector then
p.selector = settings.selector
end
p.domain = dkim_domain

return true,p
end


Načítá se…
Zrušit
Uložit