Bug #692
backslashes in buffer names are being escaped
100%
Description
As showed on the attached screenshot, the PM with 'visser\\' is shown as 'visser\\\\' in the bufferlist. It makes replying impossible because it opens a second buffer 'visser\\\\' and tries to write your message there, which of course fails since the nick 'visser\\\\' does not exist.
We tested this a bit before. New buffers do not seem to be affected, so I guess it happens when a temporarily hidden buffer is shown again. Definitely an annoying issue as there are quite a few people using a backslash in their name :)
Associated revisions
History
#1 Updated by EgS over 15 years ago
I'm sadly unable to reproduce this. But this screenshot is pretty convincing. :)
Can you go a litte more into detail what you mean with "New buffers do not seem to be affected"? I doubt that the temporarily hidden flag has anything to do with it, as it just determines whether or not to display that buffer at all. Temporarily hiding my testquery didn't help reproducing the error.
There's like a ton of places where Qt could magically add quotes so right now it's pretty much a search for the needle in the haystack... :(
I'm also pretty surprised that the (query) buffer "visser\\\\" shows up twice in your buffer list while it should be unique. Could you please check the db for the actual name of those two buffers? also what backend are you using? (I was testing it with sqlite)
#2 Updated by sph over 15 years ago
I'm using PostgreSQL.
quassel=# select buffername from buffer where buffercname like 'visser%'; buffername ---------------- visser\\\\\\\\ visser\\\\away (2 rows)
With 'new buffers appear not affected' I meant that the first time someone PM's me I can answer properly. However, the next time it's not working anymore with that nickname. I'm not sure if that's related to buffer hiding or if it's a client restart thing. So take that bit with a grain of salt ;)
#3 Updated by sph over 15 years ago
It also occurs in the backlog itself.
[02:29:27] <sph> a quick test: one backslash: \ *client restart* [02:30:19] <sph> [02:29:27] <sph> a quick test: one backslash: \\
quassel=# select * from backlog where message like '%backslash:%'; messageid | time | bufferid | type | flags | senderid | message -----------+---------------------+----------+------+-------+----------+---------------------------------------------------- 1152799 | 2009-05-26 00:29:27 | 22 | 1 | 1 | 97 | a quick test: one backslash: \\ 1152804 | 2009-05-26 00:30:19 | 22 | 1 | 1 | 97 | [02:29:27] <sph> a quick test: one backslash: \\\\ (2 rows)
#4 Updated by EgS over 15 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset a702aa44a055274a5cc8363e596c7bf944915613.
Fixes #692 - double escaping of backslashes when using Postgres
It is strongly recommended that Postgres users do upgrade to this version.