Skip to content

Commit

Permalink
Fix screen.lua.sample off-by-one error and function name
Browse files Browse the repository at this point in the history
Function is named get_sighandle() rather than get_signhandle()
and accepts indices starting with 0.
This is correctly documented in opendkim-lua man page.
Attempting to access signatures outside the range leads to errors.
  • Loading branch information
link2xt committed Jan 19, 2024
1 parent 5c53958 commit 337d2d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opendkim/screen.lua.sample
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ end

-- for each signature, ignore it if it's not from the sender's domain
for n = 1, nsigs do
sig = odkim.get_signhandle(ctx, n)
sig = odkim.get_sighandle(ctx, n - 1)
sdomain = odkim.sig_getdomain(sig)
if fdomain ~= sdomain then
odkim.sig_ignore(sig)
Expand Down

0 comments on commit 337d2d8

Please sign in to comment.