Changeset 31d9930


Ignore:
Timestamp:
2015-11-28T00:04:07Z (8 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
4e4616a
Parents:
47ab9a9
git-author:
dequis <dx@…> (28-11-15 00:00:42)
git-committer:
dequis <dx@…> (28-11-15 00:04:07)
Message:

bee_irc_user_new: Use str_reject_chars to sanitize both user and host

Fixes trac ticket 1195: https://bugs.bitlbee.org/bitlbee/ticket/1195

I had no idea how to reproduce that bug until I tried with libpurple.
The built-in jabber never had this problem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_im.c

    r47ab9a9 r31d9930  
    8484        }
    8585
    86         while ((s = strchr(iu->user, ' '))) {
    87                 *s = '_';
    88         }
     86        /* Sanitize */
     87        str_reject_chars(iu->user, " ", '_');
     88        str_reject_chars(iu->host, " ", '_');
    8989
    9090        if (bu->flags & BEE_USER_LOCAL) {
Note: See TracChangeset for help on using the changeset viewer.