chocolatey / checksum

Validates MD5/SHA1 CheckSums on the command line.
Apache License 2.0
14 stars 13 forks source link

Does not work on file paths with apostrophe(s) #9

Closed TheCakeIsNaOH closed 2 years ago

TheCakeIsNaOH commented 2 years ago

What You Are Seeing?

Checksum is stripping apostrophe(s) from file paths, and therefore not finding the file to checksum.

What is Expected?

That checksum.exe will work on file paths that contain apostrophe(s).

How Did You Get This To Happen? (Steps to Reproduce)

  1. Create a Windows 10 offline user called Mark's and it to an administrator account
  2. Log in as Mark's
  3. Run choco install 4k-video-downloader

Output Log

Log

~~~sh Verifying package provided checksum of 'bd60576f083e250245978fff6030e7bf8e448fda4b24dd7715b2f67d5c3d9e47' for 'C:\Users\Mark's\AppData\Local\Temp\chocolatey\4k-video-downloader\4.20.4\4k-video-downloaderInstall.MSI'. Running Get-ChecksumValid -file 'C:\Users\Mark's\AppData\Local\Temp\chocolatey\4k-video-downloader\4.20.4\4k-video-downloaderInstall.MSI' -checksum 'bd60576f083e250245978fff6030e7bf8e448fda4b24dd7715b2f67d5c3d9e47' -checksumType 'sha256' -originalUrl 'https://dl.4kdownload.com/app/4kvideodownloader_4.20.4_x64.msi?source=chocolatey' checksum.exe found at 'C:\ProgramData\chocolatey\helpers\..\tools\checksum.exe' Executing command ['C:\ProgramData\chocolatey\helpers\..\tools\checksum.exe' -c="bd60576f083e250245978fff6030e7bf8e448fda4b24dd7715b2f67d5c3d9e47" -t="sha256" -f="C:\Users\Mark's\AppData\Local\Temp\chocolatey\4k-video-downloader\4.20.4\4k-video-downloaderInstall.MSI"] File 'C:\Users\Marks\AppData\Local\Temp\chocolatey\4k-video-downloader\4.20.4\4k-video-downloaderInstall.MSI' doesn't exist. Command ['C:\ProgramData\chocolatey\helpers\..\tools\checksum.exe' -c="bd60576f083e250245978fff6030e7bf8e448fda4b24dd7715b2f67d5c3d9e47" -t="sha256" -f="C:\Users\Mark's\AppData\Local\Temp\chocolatey\4k-video-downloader\4.20.4\4k-video-downloaderInstall.MSI"] exited with '1'. ERROR: Checksum for 'C:\Users\Mark's\AppData\Local\Temp\chocolatey\4k-video-downloader\4.20.4\4k-video-downloaderInstall.MSI' did not meet 'bd60576f083e250245978fff6030e7bf8e448fda4b24dd7715b2f67d5c3d9e47' for checksum type 'sha256'. Consider passing the actual checksums through with --checksum --checksum64 once you validate the checksums are appropriate. A less secure option is to pass --ignore-checksums if necessary. at Get-ChecksumValid, C:\ProgramData\chocolatey\helpers\functions\Get-CheckSumValid.ps1: line 210 at Get-ChocolateyWebFile, C:\ProgramData\chocolatey\helpers\functions\Get-ChocolateyWebFile.ps1: line 385 at Install-ChocolateyPackage, C:\ProgramData\chocolatey\helpers\functions\Install-ChocolateyPackage.ps1: line 402 at , C:\ProgramData\chocolatey\lib\4k-video-downloader\tools\chocolateyinstall.ps1: line 25 at , C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1: line 49 at , : line 1 ~~~

choco-bot commented 1 year ago

:tada: This issue has been resolved in version 0.3.0 :tada:

The release is available on:

Your GitReleaseManager bot :package::rocket: