Roundcube search error

Hello,

Yesterday I updated the core and something else, either mail or roundcubemail, I don’t remember.
Anyhow, now the latest mail 1.7.6 and roundcubemail 2.1.1 are installed.

Problem:
When I search something with an accent in it, like á, the following error message appears:

Server Error: UID SEARCH: Error in IMAP command UID SEARCH: Missing LF after literal size (0.001 + 0.000 secs).

Earlier we had no problem.

Just by some other PHP project earlier, I was thinking about maybe something with multibyte replace somewhere? Or maybe something completely different.

Thanks!

2 Likes

It’s a Roundcube upstream bug in the current version 1.6.14, see Can't search using polish characters after update to 1.6.14: Missing LF after literal size · Issue #10121 · roundcube/roundcubemail · GitHub

Unfortunately downgrading Roundcube to 1.6.13 isn’t trivial, I’m searching for a solution…

EDIT:

It’s already fixed here. I assume the fix will be included in the next release.

You could apply the fix manually as a workaround but those changes won’t survive a container restart.

Enter roundcubemail env:

runagent -m roundcubemail1

Enter roundcubemail container:

podman exec -ti roundcubemail-app bash

Install an editor (nano in this example)

apt update
apt install nano

Edit search.php:

nano program/actions/mail/search.php

Add the following at line 59:

        // Workaround
        $search_str = preg_replace('/[\r\n]+/', ' ', $search_str);

Remove those lines at line 78:

        // We pass the filter as-is into IMAP SEARCH command. A newline could be used
        // to inject extra commands, so we remove these.
        $search_str = preg_replace('/[\r\n]+/', ' ', $search_str);

Now the Roundcube search including special chars should work again.

1 Like