paket config add-credentials doesn't work on Linux if the username contains "\"
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
I can't seem to figure out the way to make paket write the username including the domain using config add-credentials on Linux (in a Docker container, if that matters).
Tech details:
root@15d1470702a7:~/# mono "./.paket/paket.exe" --version
Paket version 5.173.4
root@15d1470702a7:~# mono --version
Mono JIT compiler version 5.12.0.226 (tarball Thu May 3 10:03:41 UTC 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: supported, not enabled.
GC: sgen (concurrent by default)
The full command:
mono "./.paket/paket.exe" config add-credentials https://my.awesome.feed/nuget/Feed --username domain\user --password pass123 --authtype ntlm
Repro steps
How I tested it:
rm -f /home/jenkins/.config/Paket/paket.config && mono "./.paket/paket.exe" config add-credentials https://my.awesome.feed/nuget/Feed --username domain\user --password pass123 --authtype ntlm && cat /home/jenkins/.config/Paket/paket.config
How else did I try:
domain\user
'domain\user'
"domain\user"
domain\\user
'domain\\user'
"domain\\user"
All the commands resulted in the following paket.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<credentials>
<credential source="https://my.awesome.feed/nuget/Feed" username="domainuser" password="Q+VLnr6M63Pj7a4f6+PHBQ4tKFnkadxCvSH9vtK4EzQfmdCBkY/6oODOdpRO4ChdsUBUJzQ6LzKjXVFqp
bzWudhtHjac+kUKlZWxYlBxnxqvyWznAvdsRAsf76mwFSZYe03uTmdXCRXb5KKCS7UssMmF2w9wAkYo3/wde0YMH5xpEIuoea+53H0fecZi8qBjPrXR4/RH7OHjlvUZfxAZ+c8s7WmDy4Xi+1fwabliT2jwf/xKHd38WFp5Y77K+u
n+8LBvqU9Kb+C9bLyJQ9YIcg==" authType="ntlm" salt="SZrBFTNbUbs=" />
</credentials>
</configuration>
except for when the username was written as 'domain\\user', in this case the resulting user name was username="domain\\user" (notice two slashes):
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<credentials>
<credential source="https://my.awesome.feed/nuget/Feed" username="domain\\user" password="c4WOAWKQaVpflX1K3PE0qYWADLvdv6gnWdnY7+pXTlzaPeb6e+wa7bCi48COlW6VUOBW74Ogm9tM1F7
1fXQt/tPYGyWx8wQezSBQKTdnoMZgQPKm5A0Dofa7rCV7Q9Qku6eykP9sj3xErDsSJSYe4C4QthYQ0mRKFPm4G0QZp37woqNcjSqYMqHfoDhiMm1AryMs76A4G9FRD97aKhly4SHQGtS2faTBLOll8M7yYzJRWCUQBYQ9+4XvEUDB
T5TrIZPGjWfya0+3NkhkvKQuFQ==" authType="ntlm" salt="gMkcjC6CU5U=" />
</credentials>
</configuration>
Expected behavior
I expect there to be a command which would allow me to specify the domain in the user name.
Actual behavior
See Repro steps
Known workarounds
Can't find any
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the config add-credentials command and reproduce it under Linux/Mono using the supplied username variants, then inspect /home/jenkins/.config/Paket/paket.config. Done means a domain-qualified username is preserved correctly in the generated configuration and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp, linux
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100