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

[CalDAV] Validate notified emails #25310

Merged
merged 1 commit into from
Jan 25, 2021
Merged

Conversation

tcitworld
Copy link
Member

Some user managed to have some event with this.

PRODID:+//IDN bitfire.at//DAVx5/2.5.1-ose ical4j/2.2.4
[...]
ORGANIZER:mailto:Framagenda

This generates the following:

An unhandled exception has been thrown:
TypeError: idn_to_ascii() expects parameter 1 to be string, null given in /var/www/nextcloud/lib/private/Mail/Message.php:88
Stack trace:
#0 [...]/nextcloud/lib/private/Mail/Message.php(88): idn_to_ascii(NULL, 0, 1)
#1 [...]/nextcloud/lib/private/Mail/Message.php(149): OC\Mail\Message->convertAddresses(Array)
#2 [...]/nextcloud/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php(122): OC\Mail\Message->setTo(Array)
#3 [...]/nextcloud/apps/dav/lib/CalDAV/Reminder/ReminderService.php(150): OCA\DAV\CalDAV\Reminder\NotificationProvider\EmailProvider->send(Object(Sabre\VObject\Component\VEvent), 'Personal', Array)
#4 [...]/nextcloud/apps/dav/lib/Command/SendEventReminders.php(84): OCA\DAV\CalDAV\Reminder\ReminderService->processReminders()
#5 [...]/nextcloud/apps/bookmarks/vendor/symfony/console/Command/Command.php(255): OCA\DAV\Command\SendEventReminders->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 [...]/nextcloud/apps/bookmarks/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 [...]/nextcloud/apps/bookmarks/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\DAV\Command\SendEventReminders), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 [...]/nextcloud/apps/bookmarks/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 [...]/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 [...]/nextcloud/console.php(100): OC\Console\Application->run()
#11 [...]/nextcloud/occ(11): require_once('/var/www/nextcl...')
#12 {main}

(unrelated, but quite strange paths with the bookmarks app here)

This makes sure both event's attendees and sharees, as well as event's organizer email addresses, are validated before trying to send them.

@ChristophWurst ChristophWurst added this to the Nextcloud 21 milestone Jan 25, 2021
@nickvergessen
Copy link
Member

I guess we should backport?

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
@rullzer rullzer merged commit c6df3d9 into master Jan 25, 2021
@rullzer rullzer deleted the dav-validate-email-addresses branch January 25, 2021 19:45
@rullzer
Copy link
Member

rullzer commented Jan 25, 2021

/backport to stable20

@rullzer
Copy link
Member

rullzer commented Jan 25, 2021

/backport to stable19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants