Bug 541327 - Support preemptive basic authentication
Summary: Support preemptive basic authentication
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 5.1   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 5.11   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-19 14:56 EST by Konrad Windszus CLA
Modified: 2021-01-15 18:41 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konrad Windszus CLA 2018-11-19 14:56:06 EST
HTTP URLs support encoding basic authentication information in it. 

Unfortunately this information is lost in https://github.com/eclipse/jgit/blob/30c6c7542190c149e2aee792f992a312a5fc5793/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java#L286. While the parameter "urish" still contains the password given in the original url, the resulting "java.net.URL" does not contain it, as it is being created from "URIsh.toString()" which does not include the password.

That is a problem, whenever the server does not answer with the expected "401" status code, as then the password is never transmitted to the server.
Comment 1 Eclipse Genie CLA 2018-11-20 10:10:15 EST
New Gerrit change created: https://git.eclipse.org/r/132762
Comment 2 Eclipse Genie CLA 2020-12-03 11:08:06 EST
New Gerrit change created: https://git.eclipse.org/r/c/jgit/jgit/+/173320