Update docs on chmod permissions (#336)

Closes #335
This commit is contained in:
Paul Kulchenko 2022-03-07 18:13:49 -08:00 committed by GitHub
parent 4abae20172
commit 1e3c5e10ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -6231,6 +6231,9 @@ static char *RoutePath(const char *path, size_t pathlen) {
struct Asset *a;
DEBUGF("(srvr) RoutePath(%`'.*s)", pathlen, path);
if ((a = GetAsset(path, pathlen))) {
// only allow "read other" permissions for security
// and consistency with handling of "external" files
// in this and other webservers
if ((m = GetMode(a)) & 0004) {
if (!S_ISDIR(m)) {
return HandleAsset(a, path, pathlen);