Git Bug Report: git credential 'url' parsing clear other fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I encountered what seems to be a small bug in git credential parsing.
Just want to confirm it's not expected behavior.
I'm willing to work on a patch.

First time submitting a bug to git (and a potential patch),
so let me know if I do anything wrong!

What did you do before the bug happened? (Steps to reproduce your issue)

Run git credential approve with the 'url' field of the form NOT as first entry.

example:
git -c credential.helper= -c "credential.helper=store
--file=.git-credentials" credential approve

input:
```
username=user
password=s3cret
url=https://example.com/repository.git
```

This next input works as intended.
input:
```
url=https://example.com/repository.git
username=user
password=s3cret
```

This was reproduced on both master and next branches.


What did you expect to happen? (Expected behavior)

Credentials should be saved with `username` and `password` provided.
`url` parsing should not clear the `credential` struct.


What happened instead? (Actual behavior)

`username` and `password` are correctly parsed and stored in the struct.
`url` parsing then clear the fields.


Culprit would be this `credential_clear` in `credential_from_url_1`.
On branch `next`, commit  `2a3ae87e7f8e9585d7565a8b5d6a6c9c28d6d943`.


Thanks,
Thomas Desveaux




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux