Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/user_saml.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/UserBackend.php')
-rw-r--r--lib/UserBackend.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/UserBackend.php b/lib/UserBackend.php
index b65bccf9..dcec830a 100644
--- a/lib/UserBackend.php
+++ b/lib/UserBackend.php
@@ -702,6 +702,11 @@ class UserBackend implements IApacheBackend, UserInterface, IUserBackend {
*
*/
public function testEncodedObjectGUID(string $uid): string {
+ if (preg_match('/[^a-zA-Z0-9=+\/]/', $uid) !== 0) {
+ // certainly not encoded
+ return $uid;
+ }
+
$candidate = base64_decode($uid, false);
if($candidate === false) {
return $uid;