You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I'm doing .use(express.static('/var/www/html')) and some attacker manages to ln -s /etc/passwd /var/www/html, then http://host/passwd will serve up /etc/passwd. Is there any way to tell serve-static not to follow symlinks, or to restrict them so that they're only followed to files within the directory being served?
I'm essentially asking for Apache's FollowSymLinks or nginx's disable_symlinks.
The text was updated successfully, but these errors were encountered:
I submitted a pull request that provides this behavior via a new option called followsymlinks which defaults to true. If it's set to false, it will cause paths that contain symlinks to be forbidden.
If I'm doing
.use(express.static('/var/www/html'))
and some attacker manages toln -s /etc/passwd /var/www/html
, then http://host/passwd will serve up /etc/passwd. Is there any way to tell serve-static not to follow symlinks, or to restrict them so that they're only followed to files within the directory being served?I'm essentially asking for Apache's FollowSymLinks or nginx's disable_symlinks.
The text was updated successfully, but these errors were encountered: