Skip to content

Commit ea08525

Browse files
committed
feat: do not send username password in case of anonymous
1 parent 74d4999 commit ea08525

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/components/dockerRegistry/Docker.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -818,8 +818,12 @@ const DockerForm = ({
818818
...(registryStorageType !== RegistryStorageType.OCI_PUBLIC &&
819819
selectedDockerRegistryType.value === RegistryType.OTHER
820820
? {
821-
username: trimmedUsername,
822-
password: parsePassword(customState.password.value),
821+
...(authenticationType === OtherRegistryAuthenticationType.USERNAME_PASSWORD
822+
? {
823+
username: trimmedUsername,
824+
password: parsePassword(customState.password.value),
825+
}
826+
: {}),
823827
connection: state.advanceSelect.value,
824828
cert: state.advanceSelect.value !== CERTTYPE.SECURE_WITH_CERT ? '' : state.certInput.value,
825829
}

0 commit comments

Comments
 (0)