wrolpi/modules/repos
Roland 00d7816cfd
repos: pin the repo's host once, and only exempt its own host and port
A submodule on the repo's host was allowed unpinned, on any port.  The
owner of the repo's domain could serve the clone from a public address,
then answer the submodule's lookup with an internal address (DNS
rebinding), or point it at another port on that name.

The repo's host is now resolved once per download, and every fetch
(ls-remote, clone, fetch, submodule update) is pinned to that answer.  A
submodule on the repo's host *and port* is fetched from those same
addresses, still allowing a LAN forge the user chose; another port on
that name is checked like any other host.  Tests no longer use real DNS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 17:38:45 -06:00
..
test repos: pin the repo's host once, and only exempt its own host and port 2026-10-06 17:38:45 -06:00
__init__.py Add a Repos module that mirrors git repositories (backend) 2026-10-06 16:56:09 -06:00
api.py repos: history, Download ZIP, and submodules 2026-10-06 16:56:09 -06:00
conftest.py repos: pin the repo's host once, and only exempt its own host and port 2026-10-06 17:38:45 -06:00
downloader.py repos: pin the repo's host once, and only exempt its own host and port 2026-10-06 17:38:45 -06:00
errors.py Add a Repos module that mirrors git repositories (backend) 2026-10-06 16:56:09 -06:00
lib.py repos: pin the repo's host once, and only exempt its own host and port 2026-10-06 17:38:45 -06:00
models.py repos: history, Download ZIP, and submodules 2026-10-06 16:56:09 -06:00
schema.py repos: history, Download ZIP, and submodules 2026-10-06 16:56:09 -06:00