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.
1 parent 6ca4627 commit d87b9ddCopy full SHA for d87b9dd
apps/dav/lib/Connector/Sabre/Principal.php
@@ -170,7 +170,11 @@ public function getPrincipalByPath($path) {
170
}
171
172
if ($prefix === $this->principalPrefix) {
173
- $user = $this->userManager->get($name);
+ // Depending on where it is called, it may happen that this function
174
+ // is called either with a urlencoded version of the name or with a non-urlencoded one.
175
+ // The urldecode function replaces %## and +, both of which are forbidden in usernames.
176
+ // Hence there can be no ambiguity here and it is safe to call urldecode on all usernames
177
+ $user = $this->userManager->get(urldecode($name));
178
179
if ($user !== null) {
180
return $this->userToPrincipal($user);
0 commit comments