You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, signWithParams: '/n "My Awesome Company"' is parsed into ['/n', '"My Awesome Company"']. Double quotes are kept in place as the arg value. Then it's passed into signtool via Node.js fork, it's passed as an argument.
As a result, signtool receives value with double quotes "My Awesome Company" instead of the actual value My Awesome Company.
Same problem with device tokens and /csp, /kc params.
Proposals
1. Don't parse signWithParams
Currently params from the result of parsing are never used individually.
Problem
When additional arguments are passed via
signWithParams
, they are parsed into arguments using RegExp.windows-sign/src/sign-with-signtool.ts
Lines 67 to 69 in 2605684
For example,
signWithParams: '/n "My Awesome Company"'
is parsed into['/n', '"My Awesome Company"']
. Double quotes are kept in place as the arg value. Then it's passed intosigntool
via Node.jsfork
, it's passed as an argument.As a result,
signtool
receives value with double quotes"My Awesome Company"
instead of the actual valueMy Awesome Company
.Same problem with device tokens and
/csp
,/kc
params.Proposals
1. Don't parse
signWithParams
Currently params from the result of parsing are never used individually.
2. Parse params with values
Then it results into
['/n', 'My Awesome Company']
instead of['/n', '"My Awesome Company"']
3. use
windowsVerbatimArguments: true
and quote other params insteadSolve the problem the other way around — quote args provided from
@electron/windows-sign
.I'd prefer option 2, as it allows fixing another issue.
I'm ready to prove a PR, if that's ok.
The text was updated successfully, but these errors were encountered: