X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/cbe586a91926490315c183de105cba6ee4872d1e..53e5fdd4e4c2cf8b53702e559797185f2d009187:/package/uhttpd/src/uhttpd-file.c?ds=sidebyside diff --git a/package/uhttpd/src/uhttpd-file.c b/package/uhttpd/src/uhttpd-file.c index 81f66a34b..850a14175 100644 --- a/package/uhttpd/src/uhttpd-file.c +++ b/package/uhttpd/src/uhttpd-file.c @@ -29,7 +29,7 @@ static const char * uh_file_mime_lookup(const char *path) { struct mimetype *m = &uh_mime_types[0]; - char *e; + const char *e; while( m->extn ) { @@ -275,7 +275,9 @@ static void uh_file_dirlist(struct client *cl, struct http_request *req, struct strncat(filename, files[i]->d_name, sizeof(filename) - strlen(files[i]->d_name)); - if( !stat(filename, &s) && (s.st_mode & S_IFDIR) ) + if( !stat(filename, &s) && + (s.st_mode & S_IFDIR) && (s.st_mode & S_IXOTH) + ) uh_http_sendf(cl, req, "