mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-07 13:44:24 +00:00
Prevent path traversal when handling custom geo downloads by adding ErrCustomGeoPathTraversal and a validateDestPath() helper that ensures destination paths stay inside the bin folder. Call validateDestPath from downloadToPathOnce, Update and Delete paths and wrap errors appropriately. Reconstruct sanitized URLs in sanitizeURL to break taint propagation before use. Map the new path-traversal error to a user-facing i18n message in the controller. |
||
|---|---|---|
| .. | ||
| api.go | ||
| base.go | ||
| custom_geo.go | ||
| inbound.go | ||
| index.go | ||
| server.go | ||
| setting.go | ||
| util.go | ||
| websocket.go | ||
| xray_setting.go | ||
| xui.go | ||