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

Encode decode from server is misordered #661

Closed
wants to merge 8 commits into from

Conversation

mojadita
Copy link
Contributor

Sorry, I did a rebase to master and the old branch must be deleted.

Now the patch I think is correct.

mojadita and others added 6 commits January 19, 2016 17:44
Message decoding must be done on the whole message.  Protocol commands
and control delimiters are all ascii subset of utf-8 and every
data from the server (like nickname, user ident, and server name) are
subject to charset encodings, so no need to focus only on text data
part.

Also, it has been detected that server data on output is first encoded
as a message and then charset converted.  This must happen in reverse
direction (first decoded, then parsed) on input, and message fields are
first extracted from message (to dynamic memory) and then the message
is converted (so message already extracted parameters are not charset
decoded)  This is wrong.  Message decoding is being moved to first place
(even before raw printing)
The decoding code has ben moved to the beginning of
the input processing code.  In this way, we first
decode the message and then extract the info, not as
was being done before, that we extracted the info to
dynamically allocated strings and then did the decoding
of the original message (this lead to confusion on nicks
channels with non ascii characters)

This tried to be solved by trying to decode/encode only
parts of the message which is incorrect, so we have undone
that modifications.
Cannot use channel or nick if we have to decode server messages
before we have decoded the destination channel or nick they are
directed to.
irc.network.channel_encode parameter is no longer
necessary due to how are messages decoded from
a server using a charset for nick-names and
domain part in masks.
weechat_plugin->name,
server->name,
ptr_chan_nick);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The then part of this if should be eliminated to be consistent with the decode part (not using nick/channel part in modifier) I should eliminate from line 2100 to 2109 (both inclusive)

encode is inconsistent in modifier, which users
<plugin_name>.<server_name>.<channel_or_nick> when charset dependant
of nick has been disabled.  Now use only <plugin_name>.<server_name>
as modifier for encoding.
@mojadita
Copy link
Contributor Author

What to do now? a bad checksum in an apt-get is condition sufficient for a patch to be rejected? Will CI system recompile it again? Have I to upload a new commit? Thanks in advance

@flashcode
Copy link
Member

@mojadita : of course this is an issue on Travis side, I'll run the test again.

@mojadita
Copy link
Contributor Author

Thanks!!!

@mojadita
Copy link
Contributor Author

I think the patch is ready for your consideration. I have run it locally and everything seems to work nice.

@flashcode flashcode added the bug Unexpected problem or unintended behavior label Jan 20, 2016
@programadorhedonista
Copy link

Applying this patch I can see correctly the iso-8859-15 encoded hostnames (issue #482)
Thanks!

@flashcode
Copy link
Member

Hi,
This should already be fixed by the issue #832, commit 39b6fb6 (fix implemented in version 2.7).
So I close this issue.
If not fixed, please tell me.

@flashcode flashcode closed this Apr 25, 2020
@flashcode flashcode self-assigned this Apr 25, 2020
@flashcode flashcode added the won't fix This will not be implemented/fixed label Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior won't fix This will not be implemented/fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants