diff options
author | dequis <dx@dxzone.com.ar> | 2015-11-27 21:00:42 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2015-11-27 21:04:07 -0300 |
commit | 31d993029df984445ee54c2321976f370bc05460 (patch) | |
tree | 74b6261cea3a06a47a229a4a03e141dac5214cf5 /irc_im.c | |
parent | 47ab9a9c9411f14bb95da9bfb97a943e1c531c48 (diff) |
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.
Diffstat (limited to 'irc_im.c')
-rw-r--r-- | irc_im.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -83,9 +83,9 @@ static gboolean bee_irc_user_new(bee_t *bee, bee_user_t *bu) } } - while ((s = strchr(iu->user, ' '))) { - *s = '_'; - } + /* Sanitize */ + str_reject_chars(iu->user, " ", '_'); + str_reject_chars(iu->host, " ", '_'); if (bu->flags & BEE_USER_LOCAL) { char *s = set_getstr(&bee->set, "handle_unknown"); |