We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 805b06a commit 310096eCopy full SHA for 310096e
1 file changed
lib/autoupdate.ps1
@@ -58,7 +58,7 @@ function find_hash_in_textfile([String] $url, [String] $basename, [String] $rege
58
# convert base64 encoded hash values
59
if ($hash -match '^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})$') {
60
$base64 = $matches[0]
61
- if(!($hash -match "^([a-fA-F0-9]{40,128})$")) {
+ if(!($hash -match "^[a-fA-F0-9]+$") -and $hash.length -in @(32, 40, 64, 128)) {
62
try {
63
$hash = ([System.Convert]::FromBase64String($base64) | ForEach-Object { $_.ToString('x2') }) -join ''
64
} catch {
0 commit comments