Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 6fc93992 authored by rswindell's avatar rswindell

If QWK-imported message's SenderHostName field is an IP address, resolve that

to a host name before comparing against host.can.
parent d4e1f0ee
......@@ -130,6 +130,7 @@ extern int thread_suid_broken; /* NPTL is no longer broken */
#endif
#include "genwrap.h"
#include "semfile.h"
#include "netwrap.h"
#include "dirwrap.h"
#include "filewrap.h"
#include "datewrap.h"
......
......@@ -67,6 +67,7 @@ bool sbbs_t::unpack_qwk(char *packet,uint hubnum)
str_list_t host_can=NULL;
str_list_t subject_can=NULL;
str_list_t twit_list=NULL;
const char* hostname;
memset(&msg,0,sizeof(msg));
......@@ -163,10 +164,11 @@ bool sbbs_t::unpack_qwk(char *packet,uint hubnum)
continue;
}
if(findstr_in_list(msg.from_host,host_can)) {
hostname=getHostNameByAddr(msg.from_host);
if(findstr_in_list(hostname,host_can)) {
eprintf(LOG_NOTICE,"!Filtering QWK message from %s due to blocked hostname: %s"
,msg.from
,msg.from_host);
,hostname);
continue;
}
......
......@@ -67,6 +67,7 @@ bool sbbs_t::unpack_rep(char* repfile)
str_list_t host_can=NULL;
str_list_t subject_can=NULL;
str_list_t twit_list=NULL;
const char* hostname;
const char* AttemptedToUploadREPpacket="Attempted to upload REP packet";
memset(&msg,0,sizeof(msg));
......@@ -192,10 +193,11 @@ bool sbbs_t::unpack_rep(char* repfile)
continue;
}
if(findstr_in_list(msg.from_host,host_can)) {
hostname = getHostNameByAddr(msg.from_host);
if(findstr_in_list(hostname,host_can)) {
SAFEPRINTF2(str,"!Filtering QWK message from %s due to blocked hostname: %s"
,msg.from
,msg.from_host);
,hostname);
logline("P!",str);
continue;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment