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

[Bug]: More than 1 quoted URL crashes komac #553

Closed
1 task done
jnichols35 opened this issue Apr 3, 2024 · 1 comment
Closed
1 task done

[Bug]: More than 1 quoted URL crashes komac #553

jnichols35 opened this issue Apr 3, 2024 · 1 comment
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jnichols35
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

I didn't see this mentioned anywhere, but it's sort of similar to #532. I'm also not sure if this is intended behavior.

When I use --urls with two URLs inside double quotes it breaks the script and throws an error:

Run $HOME/.local/bin/komac update -i "DelineaInc.ThycoticApplicationControlAgent" -v "12.0.1016" --urls "https://tmsnuget.thycotic.com/software/Agents/Thycotic_ApplicationControlAgent_x64_12_0_1016.msi https://tmsnuget.thycotic.com/software/Agents/Thycotic_ApplicationControlAgent_x86_12_0_1016.msi" --submit --token ***
Latest version of DelineaInc.ThycoticApplicationControlAgent: 11.4.3235
Error: 
   0: Invalid CFB file (0 bytes is too small)

If it's a single URL inside double quotes it doesn't seem to mind:

Run $HOME/.local/bin/komac update -i "Perimeter81Ltd.Perimeter81Ltd" -v "10.4.3.1672" --urls "http://static.perimeter81.com/agents/windows/Perimeter81_10.4.3.1672.msi" --submit --token ***
Latest version of Perimeter81Ltd.Perimeter81Ltd: 10.4.3.1672
There is already a merged pull request for Perimeter81Ltd.Perimeter81Ltd

When I remove the double quotes from around the URLs everything seems to work fine:

Run $HOME/.local/bin/komac update -i "DelineaInc.ThycoticApplicationControlAgent" -v "12.0.1016" --urls https://tmsnuget.thycotic.com/software/Agents/ThycoticAgent_x64_12_0_1016.msi https://tmsnuget.thycotic.com/software/Agents/ThycoticAgent_x86_12_0_1016.msi --submit --token ***
Latest version of DelineaInc.ThycoticApplicationControlAgent: 11.4.3235
# Created with komac v2.1.0

Any insight into this issue would be great. I maybe just not be understanding what's going on or missing something.

@jnichols35 jnichols35 added bug Something isn't working help wanted Extra attention is needed labels Apr 3, 2024
@jnichols35 jnichols35 changed the title [Bug]: Quoted URLS crash komac [Bug]: More than 1 quoted URL crashes komac Apr 3, 2024
@russellbanks
Copy link
Owner

With your first example, you're putting two URLs into one set of double quotes, so it's being seen as one single URL - https://tmsnuget.thycotic.com/software/Agents/Thycotic_ApplicationControlAgent_x64_12_0_1016.msi%20https://tmsnuget.thycotic.com/software/Agents/Thycotic_ApplicationControlAgent_x86_12_0_1016.msi. Komac 2.2.0 will instead say that it returns 404. Komac 2.1.0 mistakenly attempts to download it even if an unsuccessful status code is returned, which is why the error says 0 bytes is too small. Similar issue - #539.

The second example and third example work fine because distinct URLs are being passed in.

For your first example, you would need to either quote the separate URLs or omit the quotes altogether (like your third example). The below adds a pair of quotes to your first example so that two distinct URLs are now being passed in:

komac update -i "DelineaInc.ThycoticApplicationControlAgent" -v "12.0.1016" --urls "https://tmsnuget.thycotic.com/software/Agents/Thycotic_ApplicationControlAgent_x64_12_0_1016.msi" "https://tmsnuget.thycotic.com/software/Agents/Thycotic_ApplicationControlAgent_x86_12_0_1016.msi"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants