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

Calculated installer hash incorrect for sourceforge.net URLs #68

Closed
chausner opened this issue Jun 7, 2021 · 3 comments
Closed

Calculated installer hash incorrect for sourceforge.net URLs #68

chausner opened this issue Jun 7, 2021 · 3 comments
Assignees

Comments

@chausner
Copy link
Contributor

chausner commented Jun 7, 2021

Brief description of your issue

The installer hash included by the tool is incorrect for download URLs from sourceforge.net. So far for every URL I tried, the hash was incorrect.

Steps to reproduce

Run for example wingetcreate.exe new http://sourceforge.net/projects/ufraw/files/ufraw/ufraw-0.19.2/ufraw-0.19.2-2-setup.exe/download

Expected behavior

The installer hash should be 5BC7A132CA7483AACD09D00AC0D6DDA106D585FE227AF4EF34DABC9EE81A9844. This is also the hash that manifest validation expects, and the hash returned by

$stream = (New-Object System.Net.WebClient).OpenRead($Uri)
Get-FileHash -InputStream $stream -Algorithm SHA256

Actual behavior

The installer hash is incorrectly calculated as 41005A837D2EBF343F851815E0F6CF2BF1A64F58CDEF68D54CE8352F9008F7B7.

Environment

Windows Package Manager Manifest Creator v0.1.0.1
@palenshus
Copy link
Contributor

palenshus commented Jun 7, 2021

I'm unable to repro this, when I run wingetcreate.exe new http://sourceforge.net/projects/ufraw/files/ufraw/ufraw-0.19.2/ufraw-0.19.2-2-setup.exe/download locally I get 5BC7A132CA7483AACD09D00AC0D6DDA106D585FE227AF4EF34DABC9EE81A9844 as the InstallerSha256. I wonder if you have a bad local cached copy of the installer in %temp%, can you check and delete it if found, then try again? If that's the issue, then #56 should fix it

@palenshus palenshus self-assigned this Jun 7, 2021
@chausner
Copy link
Contributor Author

chausner commented Jun 7, 2021

Thanks for the hint. Yes, I can confirm that by deleting %temp%\download the issue is fixed. It seems I ran into a variant of #40 because all sourceforge.net URLs end with /download so the same temporary file name was being used for different downloads.

@chausner chausner closed this as completed Jun 7, 2021
@palenshus
Copy link
Contributor

Ah, thanks for checking! We'll have a new release with the fix very soon

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

3 participants