mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 07:18:30 +00:00
parent
4abae20172
commit
1e3c5e10ad
2 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue