Fix for www file areas
This commit is contained in:
parent
600c5d588f
commit
edb7209a9b
BIN
dist/ansis/bulletin1.ans
vendored
BIN
dist/ansis/bulletin1.ans
vendored
Binary file not shown.
@ -888,10 +888,13 @@ int www_handler(void * cls, struct MHD_Connection * connection, const char * url
|
||||
free(url_copy);
|
||||
|
||||
if (file_dir != -1 && file_sub != -1 && filen == NULL) {
|
||||
if (file_dir >= 0 && file_dir < conf.file_directory_count && file_sub >= 0 && file_sub < conf.file_directories[file_dir]->file_sub_count) {
|
||||
if (conf.file_directories[file_dir]->display_on_web) {
|
||||
page = www_files_display_listing(file_dir, file_sub);
|
||||
}
|
||||
}
|
||||
} else if (file_dir != -1 && file_sub != -1 && filen != NULL) {
|
||||
if (file_dir >= 0 && file_dir < conf.file_directory_count && file_sub >= 0 && file_sub < conf.file_directories[file_dir]->file_sub_count) {
|
||||
if (conf.file_directories[file_dir]->display_on_web) {
|
||||
// send file
|
||||
filename = www_files_get_from_area(file_dir, file_sub, filen);
|
||||
@ -946,6 +949,7 @@ int www_handler(void * cls, struct MHD_Connection * connection, const char * url
|
||||
}
|
||||
free(filen);
|
||||
}
|
||||
}
|
||||
if (page == NULL) {
|
||||
if (www_403(header, footer, connection) != 0) {
|
||||
free(header);
|
||||
|
Reference in New Issue
Block a user