Remove login information from update request
All checks were successful
Check PR code / translations (pull_request) Successful in 30s
Check PR code / Lint (pull_request) Successful in 38s
Check PR code / build (pull_request) Successful in 24s

Removed the username and password in the GET /update request.
The endpoint does not require authentication and it is unsafe to transmit login credentials over GET requests.
This commit is contained in:
davidoskky 2025-04-12 23:00:24 +02:00
parent e9e2b6415f
commit 4b9899c04e

View File

@ -365,27 +365,6 @@ class SelfossApi(
suspend fun update(): StatusAndData<String> = suspend fun update(): StatusAndData<String> =
bodyOrFailure( bodyOrFailure(
client.tryToGet(url("/update")) { client.tryToGet(url("/update")) {
if (!shouldHavePostLogin()) {
parameter("username", appSettingsService.getUserName())
parameter("password", appSettingsService.getPassword())
}
if (appSettingsService
.getBasicUserName()
.isNotEmpty() &&
appSettingsService.getBasicPassword().isNotEmpty()
) {
headers {
append(
HttpHeaders.Authorization,
constructBasicAuthValue(
BasicAuthCredentials(
username = appSettingsService.getBasicUserName(),
password = appSettingsService.getBasicPassword(),
),
),
)
}
}
headers { headers {
append( append(
HttpHeaders.Accept, HttpHeaders.Accept,