Skip to content
Snippets Groups Projects
Commit 09585d82 authored by rswindell's avatar rswindell
Browse files

Fix (hopefully) bug reported by Bill McG:

> !Javascript c:\sbbs\exec\newslink.js line 777:
> TypeError: hdr.extra_headers  is undefined
Appears to be caused by revision 1.101 of this file (commited in 2012):
not all messages will have "extra_headers", so the way this header field was
checked for existence could cause this error.
parent ffd21eb3
No related branches found
No related tags found
No related merge requests found
......@@ -774,7 +774,8 @@ for(i in area) {
for(h in hfields)
parse_news_header(hdr,hfields[h]); // from newsutil.js
if(hdr.extra_headers["nntp-posting-host"]!=undefined
if(hdr.extra_headers!=undefined
&& hdr.extra_headers["nntp-posting-host"]!=undefined
&& (system.trashcan("ip", hdr.extra_headers["nntp-posting-host"])
|| system.trashcan("ip-silent", hdr.extra_headers["nntp-posting-host"]))) {
print("!Filtered IP address in NNTP-Posting-Host header field: " + hdr.extra_headers["nntp-posting-host"]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment