debian-koji/vm
Ken Dreyer bf6a52c936 kojivmd: check for HTTP errors in getFile()
kojivmd proxies files from Koji's topurl through the getFile() RPC.
In some cases (misconfigurations), kojivmd can fail to download files
from topurl.

Prior to this change, if kojivmd failed to download a file (for example,
a 404 error), it would silently cache the 404 error HTTP body contents
and pass those on to verifyChecksum(). As a result, kojivmd would verify
the checksum of an HTML error page, rather than checksuming the intended
Koji archive file. In this scenario, it's difficult for administrators
to diagnose why checksums are not matching.

Check the HTTP response for errors before doing anything with the
response contents. With this change, winbuild tasks will fail with an
easier-to-understand "HTTP 404 not found" HTTPError, rather than a Koji
BuildError about checksums.
2022-11-08 17:12:03 -05:00
..
fix_kojikamid.sh a wrapper ignoring FIPS for hashlib.md5 2020-06-24 14:42:00 +02:00
kojikamid.py basic security checks with bandit 2021-10-20 15:20:14 +02:00
kojivmd kojivmd: check for HTTP errors in getFile() 2022-11-08 17:12:03 -05:00
kojivmd.conf kojid: extend SCM.assert_allowed with hub policy 2021-08-16 17:55:26 +00:00
kojivmd.init fix spelling error 2016-09-15 15:59:03 -04:00
kojivmd.service update docs links in service configs 2017-08-08 12:18:04 -04:00
kojivmd.sysconfig package kojivmd 2010-10-20 16:18:56 -04:00
Makefile remove sysv from Makefiles 2020-10-06 15:00:23 +02:00