nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
833 stars 258 forks source link

Inbox issue with IDN mails (Error: An unkown error occurred) #1320

Open msbt opened 5 years ago

msbt commented 5 years ago

Expected behavior

Not show an error

Actual behavior

Error: An unkown error occurred show at the top when opening either combined inbox or the mailbox with an email from an IDN domain

Mail app

Mail app version: 0.8.3

Mailserver or service: Haraka

Number of accounts: 1 i guess

Server configuration

Operating system: Ubuntu 16.04

Web server: apache with nginx as reverse proxy

Database: Postgres

PHP version: 7.013

Nextcloud Version: 13.0.6

Updated from an older version or fresh install: Updated

Client configuration

Browser: Latest Firefox

Operating system: Win10

Server log (data/nextcloud.log)
{"reqId":"wwuFrwKAbFunSUinLJzQ","level":3,"time":"2018-11-15T21:02:54+00:00","remoteAddr":"172.18.0.1","user":"myusername","app":"mail","method":"GET","url":"\/index.php\/apps\/mail\/api\/avatars\/url\/no-reply%40customer.%C3%B6idndomain.at","message":"Exception: {\"Exception\":\"InvalidArgumentException\",\"Message\":\"Invalid email address\",\"Code\":0,\"Trace\":\"#0 \\\/app\\\/data\\\/apps\\\/mail\\\/vendor\\\/gravatarphp\\\/gravatar\\\/src\\\/Gravatar.php(51): Gravatar\\\\Gravatar->createEmailHash('no-reply@custom...')\\n#1 \\\/app\\\/data\\\/apps\\\/mail\\\/lib\\\/Service\\\/Avatar\\\/GravatarSource.php(57): Gravatar\\\\Gravatar->avatar('no-reply@custom...', Array, true)\\n#2 \\\/app\\\/data\\\/apps\\\/mail\\\/lib\\\/Service\\\/Avatar\\\/CompositeAvatarSource.php(62): OCA\\\\Mail\\\\Service\\\\Avatar\\\\GravatarSource->fetch('no-reply@custom...', Object(OCA\\\\Mail\\\\Service\\\\Avatar\\\\AvatarFactory))\\n#3 \\\/app\\\/data\\\/apps\\\/mail\\\/lib\\\/Service\\\/AvatarService.php(109): OCA\\\\Mail\\\\Service\\\\Avatar\\\\CompositeAvatarSource->fetch('no-reply@custom...', Object(OCA\\\\Mail\\\\Service\\\\Avatar\\\\AvatarFactory), true)\\n#4 \\\/app\\\/data\\\/apps\\\/mail\\\/lib\\\/Controller\\\/AvatarsController.php(72): OCA\\\\Mail\\\\Service\\\\AvatarService->getAvatar('no-reply@custom...', 'myusername')\\n#5 [internal function]: OCA\\\\Mail\\\\Controller\\\\AvatarsController->url('no-reply@custom...')\\n#6 \\\/app\\\/code\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(161): call_user_func_array(Array, Array)\\n#7 \\\/app\\\/code\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(91): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\Mail\\\\Controller\\\\AvatarsController), 'url')\\n#8 \\\/app\\\/code\\\/lib\\\/private\\\/AppFramework\\\/App.php(115): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\Mail\\\\Controller\\\\AvatarsController), 'url')\\n#9 \\\/app\\\/code\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main('OCA\\\\\\\\Mail\\\\\\\\Contro...', 'url', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#10 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#11 \\\/app\\\/code\\\/lib\\\/private\\\/Route\\\/Router.php(297): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#12 \\\/app\\\/code\\\/lib\\\/base.php(999): OC\\\\Route\\\\Router->match('\\\/apps\\\/mail\\\/api\\\/...')\\n#13 \\\/app\\\/code\\\/index.php(42): OC::handleRequest()\\n#14 {main}\",\"File\":\"\\\/app\\\/data\\\/apps\\\/mail\\\/vendor\\\/gravatarphp\\\/gravatar\\\/src\\\/Gravatar.php\",\"Line\":110}","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko\/20100101 Firefox\/63.0","version":"13.0.6.1"}

I'm guessing the problem lies within gravatar, any ideas?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/66229191-inbox-issue-with-idn-mails-error-an-unkown-error-occurred?utm_campaign=plugin&utm_content=tracker%2F44154351&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F44154351&utm_medium=issues&utm_source=github).
ChristophWurst commented 5 years ago

no-reply%40customer.%C3%B6idndomain.at

Looks more like an encoding issue https://duckduckgo.com/?q=url+decode+no-reply%2540customer.%25C3%25B6idndomain.at&ia=answer

msbt commented 5 years ago

Well yes, that's what I was pointing towards, the Nextcloud installation is in german, so that shouldn't happen.