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

Commits (1)
......@@ -810,12 +810,6 @@ long extract_files_from_archive(const char* archive, const char* outdir, const c
if(filetype != AE_IFREG)
continue;
char* filename = getfname(pathname);
if(allowed_filename_chars != NULL
&& *allowed_filename_chars != '\0'
&& strspn(filename, allowed_filename_chars) != strlen(filename)) {
safe_snprintf(error, maxerrlen, "disallowed filename '%s'", pathname);
break;
}
if(!with_path)
pathname = filename;
if(file_list != NULL) {
......@@ -826,6 +820,12 @@ long extract_files_from_archive(const char* archive, const char* outdir, const c
if(file_list[i] == NULL)
continue;
}
if(allowed_filename_chars != NULL
&& *allowed_filename_chars != '\0'
&& strspn(filename, allowed_filename_chars) != strlen(filename)) {
safe_snprintf(error, maxerrlen, "disallowed filename '%s'", pathname);
break;
}
SAFECOPY(fpath, outdir);
backslash(fpath);
SAFECAT(fpath, pathname);
......