diff --git a/CommonCore/SQL/src/de/steamwar/sql/SteamwarUser.java b/CommonCore/SQL/src/de/steamwar/sql/SteamwarUser.java index d4bed21c..025e501c 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/SteamwarUser.java +++ b/CommonCore/SQL/src/de/steamwar/sql/SteamwarUser.java @@ -335,7 +335,7 @@ public class SteamwarUser { public boolean verifyPassword(String password) { try { - if (this.password == null) { + if (!hasPassword()) { return false; } diff --git a/WebsiteBackend/src/de/steamwar/Application.kt b/WebsiteBackend/src/de/steamwar/Application.kt index 23fc3066..08cb7dcb 100644 --- a/WebsiteBackend/src/de/steamwar/Application.kt +++ b/WebsiteBackend/src/de/steamwar/Application.kt @@ -48,6 +48,7 @@ fun main() { while (true) { Thread.sleep(1000 * 10) ResponseUser.clearCache() + SteamwarUser.clear() } }.start() embeddedServer(Netty, port = 1337, host = "127.0.0.1", module = Application::module) diff --git a/WebsiteBackend/src/de/steamwar/routes/Auth.kt b/WebsiteBackend/src/de/steamwar/routes/Auth.kt index e76ae47b..1100201d 100644 --- a/WebsiteBackend/src/de/steamwar/routes/Auth.kt +++ b/WebsiteBackend/src/de/steamwar/routes/Auth.kt @@ -61,6 +61,7 @@ fun Route.configureAuth() { post { val request = call.receive() + SteamwarUser.clear() val user = SteamwarUser.get(request.name) val valid = user?.verifyPassword(request.password) ?: false