mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2026-01-30 15:34:15 +01:00
Handle missing credentials as being invalid (#1164)
In case the credentials were missing the basic authentication was just bypassed
This commit is contained in:
@@ -108,7 +108,7 @@ object JavalinSetup {
|
||||
|
||||
app.beforeMatched { ctx ->
|
||||
fun credentialsValid(): Boolean {
|
||||
val basicAuthCredentials = ctx.basicAuthCredentials() ?: return true
|
||||
val basicAuthCredentials = ctx.basicAuthCredentials() ?: return false
|
||||
val (username, password) = basicAuthCredentials
|
||||
return username == serverConfig.basicAuthUsername.value &&
|
||||
password == serverConfig.basicAuthPassword.value
|
||||
|
||||
Reference in New Issue
Block a user