Remove login information from update request
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:
parent
e9e2b6415f
commit
4b9899c04e
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user