From 337d2d8150162e0024c2e3387199047c308867bd Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 19 Jan 2024 14:08:32 +0000 Subject: [PATCH] Fix screen.lua.sample off-by-one error and function name 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. --- opendkim/screen.lua.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendkim/screen.lua.sample b/opendkim/screen.lua.sample index 9338bd6b..24f877d4 100644 --- a/opendkim/screen.lua.sample +++ b/opendkim/screen.lua.sample @@ -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)