DeFiCh / ain

DeFi Blockchain - enabling decentralized finance on Bitcoin
https://defichain.com
MIT License
399 stars 118 forks source link

Path inside SHA256 checksum file changed #2740

Open GuybrushX opened 9 months ago

GuybrushX commented 9 months ago

Summary

Steps to Reproduce

[Please use step-by bullet points to help the team reproduce the bug]

The upgrade will fail because the SHA256 file changed the path.

# 4.0.3:
124c0d5bb78193c05f7872bcd7a9fbf18d54cddf80b9bc1fffd1def582ef064e  ./defichain-4.0.0-x86_64-pc-linux-gnu.tar.gz

# 4.0.5:
c653c7591f26906fed1f766e7f3209657430de8466b26014b4c6cae42bfe5559  /__w/ain/ain/build/defichain-4.0.5-x86_64-pc-linux-gnu.tar.gz

-> Scary fact: it looks like nobody is checking the checksum of what they are downloading... This can easily become a really big issue in case compromised binaries are distributed for whatever reason.

Environment

[Please fill all of the following or NA if not applicable]

luckythai commented 7 months ago

But you don't have to create this path in the user directory /__w/ain/ain/build/ and immediately download the tar.gz there with wget. Call the sha256 from anywhere. If you copy the sha256 there straight away, you can continue to use it as is, even if the path no longer exists in newer versions. However, the checksum is valid and can also be carried out when copying into the correct path.

du musst aber nicht im userverzeichnis diesen pfad anlegen /__w/ain/ain/build/
und dort gleich mit wget die tar.gz runterladen. die sha256 von beliebieger stelle aufrufen. wenn du die sha256 auch gleich dort hin kopierst kannst du sie auch weiterhin so verwenden wenn auch keine pfadangabe mehr bei neueren versionen existiert. Die Prüfsumme ist aber gütig und beim kopieren in den richtigen Pfad auch durchführbar.