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
choco new permits illegal XML characters to be passed into the .nuspec file which can prevent choco pack from succeeding.
What is Expected?
It should either reject the input or correct it automatically--the later being nicer option when setting the title to the software's display name automatically/with helper tools.
In my specific situation, my package names are CLI friendly and follow a predictable scheme while the title is set to match the package's name as it appears in Programs and Features. Some of the names contain characters such as &. The behavior of choco new places the burden on the toolmaker for sanitizing input.
How Did You Get This To Happen? (Steps to Reproduce)
Pass in an illegal XML character into the title element with choco new. choco new A^&B using CMD
It lets you despite how that will not be able to be packaged.
Or directly edit the .nuspec as such
<title>Veeam Backup & Replication Console</title>
Execute choco pack ...
An error occurred while parsing EntityName. Line 37, position 26.
or
'<' is an unexpected token. The expected token is ';'. Line 25, position 12.
The text was updated successfully, but these errors were encountered:
I think correcting it would be nice, definitely. We are unlikely to constrain the tool though, if that makes sense. If you want to pass in things or do things that we necessarily wouldn't recommend, that's up to the consumer, not necessarily the software vendor.
I've marked this up for grabs, so if you or anyone else wants to take a stab at it, we'd be up for taking that PR.
ferventcoder
changed the title
choco new permits illegal XML characters to be passed into the .nuspec file
new - Escape illegal XML characters that would be passed into the nuspec
Apr 4, 2018
What You Are Seeing?
choco new
permits illegal XML characters to be passed into the .nuspec file which can prevent choco pack from succeeding.What is Expected?
It should either reject the input or correct it automatically--the later being nicer option when setting the title to the software's display name automatically/with helper tools.
In my specific situation, my package names are CLI friendly and follow a predictable scheme while the title is set to match the package's name as it appears in Programs and Features. Some of the names contain characters such as &. The behavior of
choco new
places the burden on the toolmaker for sanitizing input.How Did You Get This To Happen? (Steps to Reproduce)
Pass in an illegal XML character into the title element with
choco new
.choco new A^&B
using CMDIt lets you despite how that will not be able to be packaged.
Or directly edit the .nuspec as such
Execute
choco pack
...The text was updated successfully, but these errors were encountered: