Ticket #7457 (closed patch: fixed)

Opened 22 months ago

Last modified 6 months ago

Double UTF-8 encoding in oscar protocol

Reported by: xmarchello Owned by: MarkDoliner
Milestone: 2.7.0 Component: ICQ
Version: 2.5.2 Keywords: oscar icq
Cc:

Description

Sometimes Cyrillic messages in oscar protocol come UTF-8 encoded but libpurple encodes it again. This behavior usual for authorization requests.

Attachments

patch.txt (2.0 kB) - added by xmarchello 22 months ago.

Change History

Changed 22 months ago by xmarchello

follow-ups: ↓ 2 ↓ 4   Changed 22 months ago by rekkanoryo

The core issue here seems to me to be the same as in #5943.

Mark, can you please take a look at this one and see if the other patch covers this case too?

in reply to: ↑ 1   Changed 21 months ago by xmarchello

Replying to rekkanoryo:

The core issue here seems to me to be the same as in #5943. Mark, can you please take a look at this one and see if the other patch covers this case too?

In terms of function calls these tickets are unrelated. But it would be a great idea to introduce common mechanism to deal with UTF8 encoding/decoding and handle oscar protocol fixes there.

follow-up: ↓ 6   Changed 21 months ago by nops

The real problem in oscar.c in function purple_ssi_authrequest. Authorization request comes in UTF-8, but in this function it's convert to UTF-8 (msg -> reason). This is wrong, and this not need to be converted. Also, libpurple send authorization request in UTF-8 (family_feedbag.c function aim_ssi_sendauth).

Why it need to be converted? I think this is a mistake.

in reply to: ↑ 1   Changed 21 months ago by nops

Replying to rekkanoryo:

The core issue here seems to me to be the same as in #5943.

No, this ticket is not related.

  Changed 14 months ago by darkrain42

  • milestone set to Patches Needing Review

in reply to: ↑ 3   Changed 10 months ago by darkrain42

  • keywords patch removed
  • milestone changed from Patches Needing Review to Patches Needing Improvement

Replying to nops:

The real problem in oscar.c in function purple_ssi_authrequest. Authorization request comes in UTF-8, but in this function it's convert to UTF-8 (msg -> reason). This is wrong, and this not need to be converted. Also, libpurple send authorization request in UTF-8 (family_feedbag.c function aim_ssi_sendauth). Why it need to be converted? I think this is a mistake.

This is my conclusion too. However, lacking a history of experience with OSCAR (and in particular all the various ICQ clients), I'm not comfortable saying that the solution is just to remove the decoding step (or have the default be Unicode and then also try the value from the account options).

  Changed 6 months ago by Korich

this is patch work good!
now all ok, when take request message on russian lang
thanks xmarchello

to dev - why You not apply it?

  Changed 6 months ago by MarkDoliner

  • status changed from new to closed
  • resolution set to fixed

I changed purple_ssi_authrequest to not try to convert the message encoding. This fixes the problem for me in my testing. If there are other places that you see problems then please file specific tickets for them (after searching to make sure there isn't already an existing ticket).

Thanks!

  Changed 6 months ago by MarkDoliner

  • milestone changed from Patches Needing Improvement to 2.7.0

  Changed 6 months ago by markdoliner@…

(In [4f0c3aedc3b013ab2175e57b71bab92988e4f812]):
Don't try to convert the message in incoming auth requests. The oscar protocol documentation that used to be posted on AOL's web site stated that, "All strings in Feedbag are UTF8 encoded." Looks like the current conversion code was added in a59a61f8b5d0874acb16f9ca8e57a074cf037eca

I believe this fixes #7457

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!