Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix(cli): reject checksums that are not SHA-256 digests

Andrejde09a3a0b8f1
diff --git a/packages/cli/scripts/homebrew-formula.sh b/packages/cli/scripts/homebrew-formula.sh
index e70ab712b..573a7b605 100755
--- a/packages/cli/scripts/homebrew-formula.sh
+++ b/packages/cli/scripts/homebrew-formula.sh
@@ -18,6 +18,10 @@ sha() {
exit 1
;;
esac
+ if [ "${#value}" -ne 64 ]; then
+ echo "The checksum for $1 in $sums is not a SHA-256 digest" >&2
+ exit 1
+ fi
printf '%s' "$value"
}