mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 13:49:57 -05:00
A repo's .gitmodules is chosen by whoever controls the repo, so a submodule URL could make WROLPi fetch https://localhost:8443/..., https://10.0.0.1/..., etc. (SSRF), and show the response's error. Every submodule URL is now checked before git fetches it: relative URLs, the repo's own host, and hosts whose addresses are all public are allowed; anything else defers the download with the reason. Nested submodules are checked out one level at a time (instead of git's --recursive) so each level is checked, at most 5 levels deep. Submodule fetches do not follow HTTP redirects, so a checked host cannot redirect git into the network. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_api.py | ||
| test_config.py | ||
| test_downloader.py | ||
| test_extras.py | ||
| test_lib.py | ||
| test_search.py | ||