diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml
index d461cdfc706a07bca624aa8d2ecdbe5210515d43..762f58131b542b799aa1eaefcfead14683467a5f 100644
--- a/build/psalm-baseline.xml
+++ b/build/psalm-baseline.xml
@@ -5160,7 +5160,8 @@
       <code>$this-&gt;createUserFromBackend($uid, $password, $backend)</code>
       <code>$this-&gt;createUserFromBackend($uid, $password, $backend)</code>
     </NullableReturnStatement>
-    <UndefinedInterfaceMethod occurrences="4">
+    <UndefinedInterfaceMethod occurrences="5">
+      <code>checkPassword</code>
       <code>checkPassword</code>
       <code>countUsers</code>
       <code>createUser</code>
diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php
index 1d58c68268c6b9647b0c1b31776db6942e6e3e43..8e441e2e41909581c0be84e74675c7128f473a56 100644
--- a/lib/private/User/Manager.php
+++ b/lib/private/User/Manager.php
@@ -231,6 +231,20 @@ class Manager extends PublicEmitter implements IUserManager {
 			}
 		}
 
+		// since http basic auth doesn't provide a standard way of handling non ascii password we allow password to be urlencoded
+		// we only do this decoding after using the plain password fails to maintain compatibility with any password that happens
+		// to contains urlencoded patterns by "accident".
+		$password = urldecode($password);
+
+		foreach ($this->backends as $backend) {
+			if ($backend->implementsActions(Backend::CHECK_PASSWORD)) {
+				$uid = $backend->checkPassword($loginName, $password);
+				if ($uid !== false) {
+					return $this->getUserObject($uid, $backend);
+				}
+			}
+		}
+
 		return false;
 	}