[
https://issues.apache.org/jira/browse/CB-7309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14096850#comment-14096850
]
Sergey Grebnov commented on CB-7309:
------------------------------------
This is because coho uses the following regexp to remove path component from
output string
{code}
function extractHashFromOutput(output) {
return output.replace(/.*?:/, '').replace(/\s*/g, '').toLowerCase();
}
{code}
It does not work correct for absolute paths on Windows since they contain
trailing drive with ':' character (D:\), for example
{code}
D:\temp\vote\cordova-cordova-3.5.0-0.2.7.tgz:
F0 01 69 C7 2E 2D 5E 0E 4C F7 6A DF 86 61 E2 B0
{code}
Propose to replace to
{code}
function extractHashFromOutput(output) {
return output.slice(output.lastIndexOf(':') + 1).replace(/\s*/g,
'').toLowerCase();
}
{code}
> Coho. verify-archive incorrectly parses hash output on Windows
> --------------------------------------------------------------
>
> Key: CB-7309
> URL: https://issues.apache.org/jira/browse/CB-7309
> Project: Apache Cordova
> Issue Type: Bug
> Components: Coho
> Reporter: Sergey Grebnov
> Assignee: Sergey Grebnov
>
> Repro steps
> 0. Set up coho on Windows
> 1. Download archives you want to verify, for example from
> https://dist.apache.org/repos/dist/dev/cordova/CB-7267/
> 2. Run coho verify-archive cordova-cordova-3.5.0-0.2.7.tgz
> 3. Observe coho claims is MD5 does not match
> ./ ============================= Computing MD5 for:
> D:\temp\vote\cordova-cordova-3.5.0-0.2.7.tgz
> MD5 does not match
> But you can see that MD5 hash is correct:
> gpg --print-md MD5 cordova-cordova-3.5.0-0.2.7.tgz
> cordova-cordova-3.5.0-0.2.7.tgz: F0 01 69 C7 2E 2D 5E 0E 4C F7 6A DF 86 61 E2
> B0
--
This message was sent by Atlassian JIRA
(v6.2#6252)