瀏覽代碼

[Minor] Do not push invalid real_ip for received

tags/3.1
Vsevolod Stakhov 2 年之前
父節點
當前提交
2ce612ba70
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6
    1
      src/libmime/received.cxx

+ 6
- 1
src/libmime/received.cxx 查看文件

@@ -816,7 +816,12 @@ received_export_to_lua(received_header_chain *chain, lua_State *L) -> bool
push_nullable_string(rh.by_hostname, "by_hostname");
push_nullable_string(rh.for_mbox, "for");

rspamd_lua_ip_push (L, rh.addr);
if (rh.addr) {
rspamd_lua_ip_push(L, rh.addr);
}
else {
lua_pushnil(L);
}
lua_setfield(L, -2, "real_ip");

const auto *proto = "unknown";

Loading…
取消
儲存