We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9e88559 + ac87e46 commit 380472dCopy full SHA for 380472d
apps/dav/lib/Connector/Sabre/Principal.php
@@ -168,7 +168,11 @@ public function getPrincipalByPath($path) {
168
}
169
170
if ($prefix === $this->principalPrefix) {
171
- $user = $this->userManager->get($name);
+ // Depending on where it is called, it may happen that this function
172
+ // is called either with a urlencoded version of the name or with a non-urlencoded one.
173
+ // The urldecode function replaces %## and +, both of which are forbidden in usernames.
174
+ // Hence there can be no ambiguity here and it is safe to call urldecode on all usernames
175
+ $user = $this->userManager->get(urldecode($name));
176
177
if ($user !== null) {
178
return $this->userToPrincipal($user);
0 commit comments