Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
9e093633
Unverified
Commit
9e093633
authored
4 years ago
by
Kevin James
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(auth): fix HTTP Basic auth for NOPASS indexes (#8442)
parent
4eaa81ac
No related branches found
Branches containing commit
Tags
32.150.1
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/util/http/auth.ts
+1
-1
1 addition, 1 deletion
lib/util/http/auth.ts
lib/util/http/host-rules.ts
+1
-1
1 addition, 1 deletion
lib/util/http/host-rules.ts
with
2 additions
and
2 deletions
lib/util/http/auth.ts
+
1
−
1
View file @
9e093633
...
...
@@ -39,7 +39,7 @@ export function applyAuthorization(inOptions: GotOptions): GotOptions {
options
.
headers
.
authorization
=
`Bearer
${
options
.
token
}
`
;
}
delete
options
.
token
;
}
else
if
(
options
.
password
)
{
}
else
if
(
options
.
password
!==
undefined
)
{
// Otherwise got will add username and password to url and header
const
auth
=
Buffer
.
from
(
`
${
options
.
username
||
''
}
:
${
options
.
password
}
`
...
...
This diff is collapsed.
Click to expand it.
lib/util/http/host-rules.ts
+
1
−
1
View file @
9e093633
...
...
@@ -15,7 +15,7 @@ export function applyHostRules(url: string, inOptions: GotOptions): GotOptions {
const
{
username
,
password
,
token
,
enabled
}
=
foundRules
;
if
(
options
.
headers
?.
authorization
||
options
.
password
||
options
.
token
)
{
logger
.
trace
({
url
},
`Authorization already set`
);
}
else
if
(
password
)
{
}
else
if
(
password
!==
undefined
)
{
logger
.
trace
({
url
},
`Applying Basic authentication`
);
options
.
username
=
username
;
options
.
password
=
password
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment