jetty / jetty/jetty.project

Consider defaulting to AllowedResourceAliasChecker instead of SymlinkAllowedResourceAliasChecker

Open
#14,860 0 comments 0 reactions 1 assignee Claimed by @lachlan-roberts View on GitHub
Enhancement
Dominant language
Java
Stars
4.1k
Forks
2k
Avg merge
3d 56m
Merged PRs (30d)
48

Description

Currently we default to using `SymlinkAllowedResourceAliasChecker` in `ContextHandler`.
```java
if (File.separatorChar == '/')
addAliasCheck(new SymlinkAllowedResourceAliasChecker(this));
```

We should consider using `AllowedResourceAliasChecker` as a safer default, as `SymlinkAllowedResourceAliasChecker` will allow symlinks to be followed outside of the web root directory.

This is an intentional feature of `SymlinkAllowedResourceAliasChecker` so if we change the default we should not do it until a major release as users may be depending on this behavior.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.