1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-18 05:18:14 +02:00
openwrt/scripts
Baptiste Jonglez b30ba14e2a scripts/download.pl: fail loudly if provided hash is unsupported
Currently, if the provided hash is unsupported (length different from 32
or 64 bytes), we happily download the requested file without any kind of
checksum verification.

This is quite dangerous and may provide a false sense of security, because
a single typo in the hash (e.g. one character deleted by mistake) may skip
checksum verification entirely.

Instead, fail immediately if we don't support the provided hash.
In particular, if an external package repository decides to change the
hash algorithm one day, we will now fail loudly instead of skipping
checksum verification without complaints.

Note: if some users of scripts/download.pl knowingly provide an empty hash
because they don't need checksum verification, this change will break
them.  This does not seem to be the case currently, but if this feature is
ever needed, an option should be added to download.pl instead of relying
on the hash being empty.

Fixes: eaa4eba10a89 ("scripts/download.pl: add SHA-256 support")

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
2017-09-11 17:13:02 +02:00
..
config
flashing build: remove absolute path to perl and replace with /usr/bin/env perl 2017-05-02 14:33:58 +02:00
arm-magic.sh
brcmImage.pl
bundle-libraries.sh build: bundle-libraries.sh: do not override argv[0] in inner exec calls 2017-07-24 13:39:21 +02:00
checkpatch.pl build: remove absolute path to perl and replace with /usr/bin/env perl 2017-05-02 14:33:58 +02:00
clang-gcc-wrapper
clean-package.sh
cleanfile build: remove absolute path to perl and replace with /usr/bin/env perl 2017-05-02 14:33:58 +02:00
cleanpatch build: remove absolute path to perl and replace with /usr/bin/env perl 2017-05-02 14:33:58 +02:00
combined-ext-image.sh build: use mkhash to replace various quirky md5sum/openssl calls 2017-01-05 11:09:12 +01:00
combined-image.sh scripts: make all scripts executable 2017-07-14 04:09:16 +02:00
config.guess
config.rpath
config.sub
deptest.sh
diffconfig.sh
dl_cleanup.py
download.pl scripts/download.pl: fail loudly if provided hash is unsupported 2017-09-11 17:13:02 +02:00
env
ext-toolchain.sh scripts: Probe external toolchains for libthread-db 2017-05-11 13:43:01 -07:00
feeds scripts/feeds: Reuse TOPDIR if defined in environment 2017-02-21 13:03:20 +01:00
fixup-makefile.pl
gen_image_generic.sh scripts/gen_image_generic.sh: drop NOGRUB variable 2017-07-14 04:09:16 +02:00
gen-dependencies.sh gen-dependencies.sh: fix handling variations in "file" output 2017-02-19 16:56:18 +01:00
get_source_date_epoch.sh scripts: get_source_date_epoch.sh: fix mercurial support, add mtime fallback 2017-02-02 00:13:50 +01:00
getver.sh scripts/getver.sh: append short git hash based on upstream commit 2017-02-01 17:48:45 +01:00
ipkg-build
ipkg-make-index.sh build: use mkhash to replace various quirky md5sum/openssl calls 2017-01-05 11:09:12 +01:00
kconfig.pl
make-ipkg-dir.sh
md5sum
metadata.pm scripts/package-metadata.pl: parse and validate field Require-User 2017-06-18 10:39:35 +08:00
mkhash.c build: add a small standalone utility for calculating md5/sha256 hash 2017-01-05 11:09:12 +01:00
mkits.sh
om-fwupgradecfg-gen.sh scripts: make all scripts executable 2017-07-14 04:09:16 +02:00
package-metadata.pl scripts/package-metadata.pl: inhibit compile deps on missing build types 2017-07-27 00:37:05 +02:00
pad_image
patch-kernel.sh
patch-specs.sh
portable_date.sh
qemustart scripts/qemustart: initial version 2017-04-23 09:19:34 +08:00
redboot-script.pl
relink-lib.sh
remote-gdb build: remove libc version suffix from build/staging directories 2017-02-07 17:18:15 +01:00
rstrip.sh rstrip.sh: fix handling variations in "file" output 2017-02-19 16:56:17 +01:00
slugimage.pl
srecimage.pl
strip-kmod.sh
symlink-tree.sh
sysupgrade-tar.sh
target-metadata.pl scripts: only generate config from feature flag if fully match 2017-03-20 22:04:41 +01:00
timestamp.pl
ubinize-image.sh