Skip to content
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

[stable28] fix(caldav): Do not load IMipPlugin before user auth and session is c… #47791

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

SebastianKrupinski
Copy link
Contributor

Back port for #45081

Do not load IMipPlugin before user is authenticated and user session is initialized

@miaulalala miaulalala changed the title fix(caldav): Do not load IMipPlugin before user auth and session is c… [stable28] fix(caldav): Do not load IMipPlugin before user auth and session is c… Sep 5, 2024
$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

Argument 1 of trim cannot be null, possibly null value provided
// 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

Argument 1 of trim cannot be null, possibly null value provided
} 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

Cannot call method getDisplayName on possibly null value
@@ -179,12 +180,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

The method OC\Server::getRequest has been marked as deprecated
@@ -179,12 +180,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

The method OC\Server::getConfig has been marked as deprecated
@@ -312,6 +310,18 @@
\OC::$server->getCommentsManager(),
$userSession
));
if (\OC::$server->getConfig()->getAppValue('dav', 'sendInvitations', 'yes') === 'yes') {

Check notice

Code scanning / Psalm

DeprecatedMethod Note

The method OC\Server::getConfig has been marked as deprecated
@solracsf solracsf added this to the Nextcloud 28.0.10 milestone Sep 6, 2024
@solracsf solracsf added the 3. to review Waiting for reviews label Sep 6, 2024
@Altahrim Altahrim mentioned this pull request Sep 11, 2024
8 tasks
…reated

Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@Altahrim Altahrim mentioned this pull request Oct 1, 2024
2 tasks
@SebastianKrupinski SebastianKrupinski merged commit 5af3575 into stable28 Oct 2, 2024
56 checks passed
@SebastianKrupinski SebastianKrupinski deleted the backport/45098/stable28 branch October 2, 2024 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants