Skip to content

Commit 0fd51a4

Browse files
committed
Refactor GitLab Personal Access Token credential configuration
The token was previously stored as the username, possibly causing authentication failures and exposing the PAT value in log output as a username
1 parent 1cab91e commit 0fd51a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Composer/ConfigFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ private static function buildCredentialsConfig(string $domain, ?Credentials $cre
6969
CredentialsType::GitlabPersonalAccessToken => [
7070
'gitlab-token' => [
7171
$domain => [
72-
'username' => $credentials->getToken(),
73-
'token' => 'private-token',
72+
'username' => 'private-token',
73+
'token' => $credentials->getToken(),
7474
],
7575
],
7676
],

0 commit comments

Comments
 (0)