This repository has been archived by the owner on Feb 18, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix asset path-traversal outside of roots
Summary:`/assets/...` requests previously supported path-traversal potentially exposing and serving (private) files outside roots. **Test plan** Prior to patching perform the a path-traversal request to the server: ``` GET /assets/../../../../etc/hosts HTTP/1.1 Cache-Control: no-store Host: 127.0.0.1:8081 Connection: close Accept-Encoding: gzip User-Agent: okhttp/2.5.0 ``` Apply patch and verify a `404` response with body: `Asset not found` Test normal asset requests work. Closes facebook#6398 Differential Revision: D3034857 Pulled By: shayne fb-gh-sync-id: f0e6714e4e3c5a63a3a402634a1eb5f3186d3561 shipit-source-id: f0e6714e4e3c5a63a3a402634a1eb5f3186d3561
- Loading branch information