-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[stable29] fix(caldav): Do not load IMipPlugin before user auth and session is c… #47790
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* | |
$this->user->method('getUID'); | |
$this->user->method('getDisplayName'); | |
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
$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 Note
// 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 Note
} 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 Note
@@ -180,12 +181,10 @@ | |||
|
|||
// 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 Note
@@ -180,12 +181,10 @@ | |||
|
|||
// 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 Note
@@ -315,6 +313,18 @@ | |||
\OC::$server->getCommentsManager(), | |||
$userSession | |||
)); | |||
if (\OC::$server->getConfig()->getAppValue('dav', 'sendInvitations', 'yes') === 'yes') { |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
@@ -315,6 +313,18 @@ | |||
\OC::$server->getCommentsManager(), | |||
$userSession | |||
)); | |||
if (\OC::$server->getConfig()->getAppValue('dav', 'sendInvitations', 'yes') === 'yes') { |
Check notice
Code scanning / Psalm
DeprecatedMethod Note
…reated Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
c7fa4da
to
d18c6af
Compare
Back port for #45081
Do not load IMipPlugin before user is authenticated and user session is initialized