[stable29] fix(caldav): Do not load IMipPlugin before user auth and session is c…#47790
[stable29] fix(caldav): Do not load IMipPlugin before user auth and session is c…#47790SebastianKrupinski merged 2 commits intostable29from
Conversation
miaulalala
left a comment
There was a problem hiding this comment.
Please remove the commented out code, otherwise it looks good!
| /* | ||
| $this->user->method('getUID'); | ||
| $this->user->method('getDisplayName'); | ||
| */ |
There was a problem hiding this comment.
| /* | |
| $this->user->method('getUID'); | |
| $this->user->method('getDisplayName'); | |
| */ |
| $senderName = $this->userManager->getDisplayName($this->userId); | ||
| // Due to a bug in sabre, the senderName property for an iTIP message can actually also be a VObject Property | ||
| // If the iTIP message senderName is null or empty use the user session name as the senderName | ||
| if (($iTipMessage->senderName instanceof Parameter) && !empty(trim($iTipMessage->senderName->getValue()))) { |
Check notice
Code scanning / Psalm
PossiblyNullArgument
| // Due to a bug in sabre, the senderName property for an iTIP message can actually also be a VObject Property | ||
| // If the iTIP message senderName is null or empty use the user session name as the senderName | ||
| if (($iTipMessage->senderName instanceof Parameter) && !empty(trim($iTipMessage->senderName->getValue()))) { | ||
| $senderName = trim($iTipMessage->senderName->getValue()); |
Check notice
Code scanning / Psalm
PossiblyNullArgument
| } elseif (is_string($iTipMessage->senderName) && !empty(trim($iTipMessage->senderName))) { | ||
| $senderName = trim($iTipMessage->senderName); | ||
| } elseif ($this->userSession->getUser() !== null) { | ||
| $senderName = trim($this->userSession->getUser()->getDisplayName()); |
Check notice
Code scanning / Psalm
PossiblyNullReference
|
|
||
| // calendar plugins | ||
| if ($this->requestIsForSubtree(['calendars', 'public-calendars', 'system-calendars', 'principals'])) { | ||
| $this->server->addPlugin(new DAV\Sharing\Plugin($authBackend, \OC::$server->getRequest(), \OC::$server->getConfig())); |
Check notice
Code scanning / Psalm
DeprecatedMethod
|
|
||
| // calendar plugins | ||
| if ($this->requestIsForSubtree(['calendars', 'public-calendars', 'system-calendars', 'principals'])) { | ||
| $this->server->addPlugin(new DAV\Sharing\Plugin($authBackend, \OC::$server->getRequest(), \OC::$server->getConfig())); |
Check notice
Code scanning / Psalm
DeprecatedMethod
| \OC::$server->getCommentsManager(), | ||
| $userSession | ||
| )); | ||
| if (\OC::$server->getConfig()->getAppValue('dav', 'sendInvitations', 'yes') === 'yes') { |
Check notice
Code scanning / Psalm
DeprecatedMethod
| \OC::$server->getCommentsManager(), | ||
| $userSession | ||
| )); | ||
| if (\OC::$server->getConfig()->getAppValue('dav', 'sendInvitations', 'yes') === 'yes') { |
Check notice
Code scanning / Psalm
DeprecatedMethod
…reated Signed-off-by: SebastianKrupinski <[email protected]>
c7fa4da to
d18c6af
Compare
Back port for #45081
Do not load IMipPlugin before user is authenticated and user session is initialized