Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix client side basic auth #1622

Closed
wants to merge 2 commits into from
Closed

Fix client side basic auth #1622

wants to merge 2 commits into from

Conversation

deathaxe
Copy link
Collaborator

This PR fixes two bugs related with basic authentication:

  1. The http_basic_auth setting is not cached by PackageManager and therefore not passed to downloaders.
  2. Basic authentication doesn't work for WinINetDownloader

As a result users with numerous custom repositories might quickly hit rather low API rate limits.

This commit adds `http_basic_auth` to the list of settings to cache
for a session. That's a general requirement for basic auth to work for
any downloader.
This commit explicitly adds basic auth to request header instead of
passing `username` and `password` to wininet.InternetConnectW().

The reason is simple: The latter doesn't work. Passing username and password seems to have no effect on Windows 11.

As a result github limits API calls to 60 per hour.
With this change 5000 are applicable.

That's an important change in case a custom repository is used rather
than packagecontrol.io channel.
@deathaxe deathaxe closed this Apr 2, 2023
@deathaxe
Copy link
Collaborator Author

deathaxe commented Apr 2, 2023

Already part of PC4.0

@deathaxe deathaxe deleted the bugfix/basic-auth branch April 2, 2023 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant