This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
6928: When a 401 response is received, raise BadAuthenticationError if credentials were present in the request URI r=deivid-rodriguez a=jdliss ### What was the end-user problem that led to this PR? Some gem servers respond to bad username/password request with a 401 instead of a 403. ### What was your diagnosis of the problem? When a 401 response was received, bundler would automatically assume no credentials were supplied, leading to a response of ``` Authentication is required for http://moto@gems.motologic.com/. Please supply credentials for this source. You can do this by running: bundle config http://moto@gems.motologic.com/ username:password ``` even when a username and password was present in the bundler config. ### What is your fix for the problem, implemented in this PR? There already exists a check for credentials in the request URI for 403 responses. I took that pattern and implemented it for 401 responses as well. ### Why did you choose this fix out of the possible options? I chose this fix because a very similar pattern already exists in bundler, I just applied the same logic to another response code. Co-authored-by: Jonathan <jonacom@lissismore.com>
- Loading branch information
Showing
4 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters