Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Verification issue on 11.1.2 for AppImage. #3876

Open
Cyber-Syntax opened this issue Jan 11, 2025 · 1 comment
Open

BUG: Verification issue on 11.1.2 for AppImage. #3876

Cyber-Syntax opened this issue Jan 11, 2025 · 1 comment

Comments

@Cyber-Syntax
Copy link
Contributor

Your Environment

  • Version used: 11.1.2

Current Behavior

Verification hash does not match on the last version (11.1.2) version. I was thinking, maybe my script (my-unicorn) caused that issue in the verify function, but I tried manually and I can say something is wrong with the hashes for the last version. I even tried to write a bunch of Python scripts to test my function to make sure there's no issue.

Anyway, I created a basic bash script to show you what the problem is; you can just try it for yourself. Just install the new file with latest-linux.yml and then install the old version (11.1.1), which will become (1). And try the script below.

#!/bin/bash

# Paths to the files
FILE_OLD="superProductivity-x86_64(1).AppImage"
FILE_NEW="superProductivity-x86_64.AppImage"

# Base64 strings
BASE64_OLD="GSqZL22HcocLRTuJY/ShHVtnyZCq1Cn4Q7ShfQqs9EmS8lsNuJppRnXwt2iYEQ+oTs8mLWhDCegOWDFQHzNsEQ=="
BASE64_NEW="OJ3XUc+B+8IiWMjgl3FdotJfWSKuZzRDlMp4EldATbvQBmo83bfblwTjtU4RFG+aICzy7y3x58ji31uL/MwGIg=="

# Function to calculate and print details for a file
compare_hashes() {
    local file=$1
    local base64_str=$2

    echo "File: $file"

    # Calculate SHA-512 hash
    local file_hash
    file_hash=$(sha512sum "$file" | awk '{print $1}')
    echo "Calculated SHA-512: $file_hash"

    # Decode Base64 and convert to hex
    local decoded_hex
    decoded_hex=$(echo "$base64_str" | base64 -d | xxd -p -c 256)
    echo "Base64-decoded hex: $decoded_hex"

    # Compare and print results
    if [[ "$file_hash" == "$decoded_hex" ]]; then
        echo "✅ Calculated hash matches the Base64-decoded hex!"
    else
        echo "❌ Calculated hash does NOT match the Base64-decoded hex!"
    fi

    echo "--------------------------------------------"
}

# Compare the old version
compare_hashes "$FILE_OLD" "$BASE64_OLD"

# Compare the new version
compare_hashes "$FILE_NEW" "$BASE64_NEW"

## OUTPUT
# ╰─❯ sh test.sh                                                                                                                                                    ─╯
# File: superProductivity-x86_64(1).AppImage
# Calculated SHA-512: 192a992f6d8772870b453b8963f4a11d5b67c990aad429f843b4a17d0aacf44992f25b0db89a694675f0b76898110fa84ecf262d684309e80e5831501f336c11
# Base64-decoded hex: 192a992f6d8772870b453b8963f4a11d5b67c990aad429f843b4a17d0aacf44992f25b0db89a694675f0b76898110fa84ecf262d684309e80e5831501f336c11
# ✅ Calculated hash matches the Base64-decoded hex!
# --------------------------------------------
# File: superProductivity-x86_64.AppImage
# Calculated SHA-512: c3410b29493baa60d737680a1282ded7564a870a538f21164d76afb812723c79ab11f6962d1e8d1ce34316492c7c49572f89579e390cabb520b78e0a55a2e0a0
# Base64-decoded hex: 389dd751cf81fbc22258c8e097715da2d25f5922ae67344394ca781257404dbbd0066a3cddb7db9704e3b54e11146f9a202cf2ef2df1e7c8e2df5b8bfccc0622
# ❌ Calculated hash does NOT match the Base64-decoded hex!
# --------------------------------------------

Can you reproduce this reliably?

Yes

Copy link

Thank you very much for opening up this issue! I am currently a bit overwhelmed by the many requests that arrive each week, so please forgive me, if I fail to respond personally. I am still very likely to at least skim read your request and I'll probably try to fix all (real) bugs if possible and I will likely review every single PR being made (please, give me a heads up if you intent to do so) and I will try to work on popular requests (please upvote via thumbs up on the original issue) whenever possible, but trying to respond to every single issue over the last years has been kind of draining and I need to adjust my approach for this project to remain fun for me and to make any progress with actually coding new stuff. Thanks for your understanding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants