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
I have verified this is the correct repository for opening this issue.
I have verified no other issues exist related to my problem.
I have verified this is not an issue for a specific package.
I have verified this issue is not security related.
I confirm I am using official, and not unofficial, or modified, Chocolatey products.
What You Are Seeing?
Authenticated sources that require correction of incorrectly cased usernames or passwords will not update the values, because Chocolatey CLI converts the string to lower-case before comparing it.
This can be an issue on, for instance, Nexus, where the username is case sensitive.
What is Expected?
Chocolatey CLI should update the value if it is different, even if all the letters match.
Add an authenticated source to your install: choco source add --name='test' --source='https://example.com/api/v2/' --username='bob' --password='bob1999'
Realising you should have capitalised 'Bob', attempt to update your source: choco source add --name='test' --source='https://example.com/api/v2/' --username='Bob' --password='bob1999' or password: choco source add --name='test' --source='https://example.com/api/v2/' --username='bob' --password='BOB1999'
Results in: Nothing to change. Config already set.
System Details
Operating System: Windows 11
Windows PowerShell Version: 5
Chocolatey CLI Version: 2.3
Chocolatey Licensed Extension version: 6.3
Chocolatey License type (Professional / Business / ?): Business
Terminal/Emulator: Windows Terminal
Installed Packages
N/A
Output Log
N/A
Additional Context
Workaround
Set the password or username to something that doesn't insensitively match the previous value, e.g. 'helen1999'.
Change it back to the correctly cased original value.
(similar to working with Windows filenames)
Proposed Solution
Sourcechecks the values and says no changes needed. This is because we specifically use ignoreCase: truein IsEqualTo
I guess my recommended fix would be to either add an IsEqualToSensitive or to add a parameter to the existing method for ignoreCase that defaults to true. That shouldn't break things, but I haven't investigated all uses of IsEqualTo() in the codebase.
The text was updated successfully, but these errors were encountered:
Checklist
What You Are Seeing?
Authenticated sources that require correction of incorrectly cased usernames or passwords will not update the values, because Chocolatey CLI converts the string to lower-case before comparing it.
This can be an issue on, for instance, Nexus, where the username is case sensitive.
What is Expected?
Chocolatey CLI should update the value if it is different, even if all the letters match.
How Did You Get This To Happen?
irm https://ch0.co/go | iex
choco source add --name='test' --source='https://example.com/api/v2/' --username='bob' --password='bob1999'
choco source add --name='test' --source='https://example.com/api/v2/' --username='Bob' --password='bob1999'
or password:choco source add --name='test' --source='https://example.com/api/v2/' --username='bob' --password='BOB1999'
Results in:
Nothing to change. Config already set.
System Details
Installed Packages
N/A
Output Log
N/A
Additional Context
Workaround
(similar to working with Windows filenames)
Proposed Solution
Source
checks the values and says no changes needed. This is because we specifically useignoreCase: true
inIsEqualTo
I guess my recommended fix would be to either add an IsEqualToSensitive or to add a parameter to the existing method for ignoreCase that defaults to true. That shouldn't break things, but I haven't investigated all uses of
IsEqualTo()
in the codebase.The text was updated successfully, but these errors were encountered: