Do not force language/locale specific URLs within nuspec if possible. Instead, if available, use non-locale/language specific URLs within nuspec so users aren't forced on any specific language when navigating links within nuspec. In this way the website may read the user's system locale and provide the appropriate content desired.
Internationalisation enhancement
Do not force language/locale specific URLs within nuspec if possible. Instead, if available, use non-locale/language specific URLs within nuspec so users aren't forced on any specific language when navigating links within nuspec. In this way the website may read the user's system locale and provide the appropriate content desired.
See https://wikipedia.org/wiki/Lcid
Examples
Root: https://www.microsoft.com/download/ Forced: https://www.microsoft.com/en-ca/download/details.aspx?id=10005 Fixed: https://www.microsoft.com/download/details.aspx?id=10005
Root: https://technet.microsoft.com/ Specific: https://technet.microsoft.com/en-us/sysinternals Fixed: https://technet.microsoft.com/sysinternals
Root: https://www.visualstudio.com/ Specific: https://www.visualstudio.com/es-es Fixed: https://www.visualstudio.com/
Root: https://wikipedia.org/wiki/ Specific: https://de.wikipedia.org/wiki/Freeware Fixed: https://wikipedia.org/wiki/Freeware
Root: https://www.mozilla.org/ Specific: https://www.mozilla.org/es-MX/privacy/firefox/ Fixed: https://www.mozilla.org/privacy/firefox/
Detection
Search for various language codes in URLs of nuspec file
regex to catch
xx-XX
in URL'(?<=http[:s]//).*?/[a-z]{2}-[a-z]{2}[^a-z]'
For popular websites like wikipedia or microsoft the search could be exact.
Scope of issue
probable total affected packages containing
xx-XX
LCID format within URLs of all chocolatey packages is 253only 27 root URLs containing
en-us
are affecting 219 packages out of total 3283 searched:root URLs containing
en-us
within all packages (3283 unique pkg IDs searched):10 packages contain URLs with
/en-GB/
5 packages contain URLs with/de/