mirror of
https://github.com/status-im/metro.git
synced 2025-01-30 21:05:11 +00:00
18612273be
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 https://github.com/facebook/react-native/pull/6398 Differential Revision: D3034857 Pulled By: shayne fb-gh-sync-id: f0e6714e4e3c5a63a3a402634a1eb5f3186d3561 shipit-source-id: f0e6714e4e3c5a63a3a402634a1eb5f3186d3561