Commit Graph

501 Commits (master)

Author SHA1 Message Date
Sébastien Helleu 9fa3609c85 relay: add command "handshake" in weechat relay protocol and nonce to prevent replay attacks (closes #1474)
This introduces a new command called "handshake" in the weechat relay protocol.
It should be sent by the client before the "init" command, to negotiate the way
to authenticate with a password.

3 new options are added:

* relay.network.auth_password
* relay.network.hash_iterations
* relay.network.nonce_size
2020-04-14 21:38:12 +02:00
Sébastien Helleu 6d99f5da45 core: move line from "Bug fixes" to "New features" (issue #1358) 2020-04-12 19:42:58 +02:00
Sébastien Helleu b947512c9a relay: add option relay.network.auth_timeout 2020-04-12 19:36:12 +02:00
Sébastien Helleu 9f55f90bbf relay: update default colors for client status
Colors changed:

* relay.color.status_active: lightblue -> green
* relay.color.status_auth_failed: lightred -> lightmagenta
* relay.color.status_connecting: yellow -> white
* relay.color.status_waiting_auth: brown -> yellow

The color relay.color.status_disconnected remains lightred by default.
2020-04-12 18:02:27 +02:00
Sébastien Helleu 7ddc815726 relay: actually use the client status "waiting_auth" in irc and weechat protocols (closes #1358)
Now the status "waiting_auth" is used and displayed in the relay buffer.

When a client connects, there are now 2 messages (except for irc protocol if
there's no password required):

relay: new client on port 9000: 1/weechat/1.2.3.4 (waiting auth)
relay: client 1/weechat/1.2.3.4 authenticated

If the authentication fails, the messages are:

relay: new client on port 9000: 1/weechat/1.2.3.4 (waiting auth)
=!= relay: authentication failed with client 1/weechat/1.2.3.4
2020-04-12 17:46:46 +02:00
Sébastien Helleu b781dd92fb core: update ChangeLog (issue #1461) 2020-04-12 10:19:01 +02:00
Sébastien Helleu 8bdd540df7 trigger: evaluate arguments of command when the trigger is created (closes #1472) 2020-04-12 09:30:56 +02:00
Sébastien Helleu 28ef93905b core: update ChangeLog (issue #1460) 2020-04-11 09:50:38 +02:00
Sébastien Helleu d78ac827e9 core: fix memory leak in calculation of expression on FreeBSD (closes #1469)
The memory leak was caused by a bug in function setlocale on FreeBSD:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243195

The fix is the following:

* Remove the calls to setlocale when formatting the result.
* The function snprintf is still called, and then is now locale dependent,
  for example in French the decimal separator is a comma instead of a dot.
* A new function calc_sanitize_decimal_number is introduced to "sanitize" a
  decimal number: keep only the decimal separator (replace it by a dot) and
  remove any other separator found.

Unit tests are added on these functions:

* calc_sanitize_decimal_number
* calc_format_result
2020-04-07 21:37:48 +02:00
Sébastien Helleu e998417f5c core: fix resize of a bar when its size is 0 (automatic) (closes #1470) 2020-04-07 19:00:33 +02:00
Sébastien Helleu fdd39c6b97 buflist: evaluate option buflist.look.sort (closes #1465)
The evaluation allows to use different sort for the bar items, for example with
such value:

    ${if:${bar_item.name}==buflist?number:short_name}

This sorts by number on the first bar item and by short name on the two other
bar items.
2020-04-06 20:49:17 +02:00
Sébastien Helleu 62fc851d81 doc: fix broken literal blocks in Japanese docs with Firefox (closes #1466) 2020-04-05 12:25:39 +02:00
Sébastien Helleu fae149b361 python: fix crash when invalid UTF-8 string is in a WeeChat hashtable converted to a Python dict (closes #1463) 2020-04-04 18:10:02 +02:00
Sébastien Helleu eb7b12f0da tests: add tests on IRC color functions
Functions tested:

- irc_color_convert_rgb2irc
- irc_color_convert_term2irc
- irc_color_for_tags
- irc_color_modifier_cb
- irc_color_weechat_add_to_infolist
2020-03-30 20:58:16 +02:00
Sébastien Helleu 1098e157c9 core: remove directory usr/share/applications/ from cygport file 2020-03-29 11:55:20 +02:00
Sébastien Helleu 7d5dc53cd9 Version 2.8 2020-03-29 09:39:36 +02:00
Sébastien Helleu 4480c7b7cc irc: split AUTHENTICATE message in 400-byte chunks (closes #1459) 2020-03-21 14:28:53 +01:00
Sébastien Helleu c29b45a0f2 api: add info "auto_connect" (closes #1453) 2020-03-20 20:42:05 +01:00
Sébastien Helleu 9545d37ab0 tests: add tests on IRC protocol functions and some callbacks
Functions tested:

* irc_protocol_is_numeric_command
* irc_protocol_log_level_for_command
* irc_protocol_tags
* irc_protocol_nick_address
* irc_protocol_cb_account
* irc_protocol_cb_away
* irc_protocol_cb_001
* irc_protocol_cb_005
2020-03-11 20:53:49 +01:00
Sébastien Helleu 8a5046f0a1 irc: add support of fake servers (no I/O, for testing purposes) 2020-03-09 21:09:55 +01:00
Sébastien Helleu 3590302183 irc: copy temporary server flag in command /server copy 2020-03-08 13:56:30 +01:00
Sébastien Helleu c48815673d core: update ChangeLog (issue #1455) 2020-03-03 21:51:03 +01:00
Sébastien Helleu 8ffe9be8a7 core: fix ChangeLog entry 2020-03-02 22:57:44 +01:00
Sébastien Helleu c6757f642f tests: fix generation of test scripts with Python 3.8 2020-03-02 21:39:27 +01:00
Sébastien Helleu dc7f1e81fb core: add CVE ids in ChangeLog 2020-03-02 20:42:26 +01:00
Sébastien Helleu 2d2b49bfaa relay: accept hash of password in init command with option "password_hash"
Allowed algorithms are:

* PBKDF2 (SHA256 or SHA512, salt, iterations)
* SHA256
* SHA512
2020-03-02 00:46:10 +01:00
Sébastien Helleu 3157d1f06e api: add function crypto_hash_pbkdf2 2020-03-01 23:14:55 +01:00
Sébastien Helleu 9a6a27ef58 core: move crypto functions to wee-crypto.c, rename API function string_hash to crypto_hash 2020-03-01 21:24:27 +01:00
Sébastien Helleu c4ef3d6c2e core: merge functions string_hash_binary and string_hash into a single function string_hash 2020-03-01 16:41:28 +01:00
Sébastien Helleu 410a5b341f api: add functions string_hash_binary and string_hash 2020-02-29 21:02:42 +01:00
Sébastien Helleu 600c43dcf5 tests: add tests on function secure_derive_key 2020-02-29 15:46:25 +01:00
Sébastien Helleu 91701cbdb4 php: fix crash when loading script with PHP 7.4 (closes #1452) 2020-02-28 21:28:29 +01:00
Sébastien Helleu a4fcd5570f core: add version 2.7.1 in ChangeLog 2020-02-20 22:14:28 +01:00
Sébastien Helleu 7352ddfcf0 build: ignore file usr/share/applications/weechat.desktop in Cygwin build 2020-02-20 22:09:12 +01:00
Sébastien Helleu 6daa09b0b8 script: fix memory leak in read of script repository file if it has invalid content 2020-02-18 21:04:21 +01:00
Sébastien Helleu c6e9e18aaa script: fix unexpected display of scripts list in buffer with command /script list -i 2020-02-16 08:04:58 +01:00
Sébastien Helleu 09aa6dbf06 core: add CVE-2020-8955 in ChangeLog 2020-02-14 07:41:56 +01:00
Sébastien Helleu 9904cb6d2e irc: fix crash when receiving a malformed message 352 (who)
Thanks to Stuart Nevans Locke for reporting the issue.
2020-02-10 07:37:11 +01:00
Sébastien Helleu 40ccacb433 irc: fix crash when a new message 005 is received with longer nick prefixes
Thanks to Stuart Nevans Locke for reporting the issue.
2020-02-09 20:04:45 +01:00
Sébastien Helleu 5edbeea338 core: fix unlikely memory leak in completion 2020-02-09 06:56:53 +01:00
Sébastien Helleu 6f4f147d8e irc: fix crash when receiving a malformed message 324 (channel mode)
Thanks to Stuart Nevans Locke for reporting the issue.
2020-02-08 20:24:50 +01:00
Sébastien Helleu 15f7d7aeb1 core: update ChangeLog 2020-02-03 21:41:25 +01:00
Sébastien Helleu 4e2718d234 irc: add nick changes in the hotlist (except self nick change) 2020-02-01 23:02:55 +01:00
Sébastien Helleu 95e34c71d6 core: update ChangeLog (issue #1442) 2020-01-30 22:07:32 +01:00
Sébastien Helleu f980820395 logger: fix crash when disabling logging on a buffer (closes #1444)
Crash happens if the log file was deleted before disabling logging and if the
option logger.file.info_lines is on.
2020-01-25 13:42:12 +01:00
Sébastien Helleu 4d67af399d core: flush stdout/stderr before forking in hook_process function (closes #1441) 2020-01-20 21:15:15 +01:00
Sébastien Helleu 7cd566e8d3 core: reset variable "old_full_name" after send of signal "buffer_renamed" (issue #1428) 2020-01-12 17:09:47 +01:00
Sébastien Helleu b79cd6d546 relay: update buffers synchronization when buffers are renamed (closes #1428) 2020-01-12 17:03:16 +01:00
Sébastien Helleu 1fac6fd404 core: add variable "old_full_name" in buffer, set before the buffer is renamed (issue #1428) 2020-01-12 16:57:08 +01:00
Sébastien Helleu 4f9c4fecd3 irc: case-insensitive comparison on incoming CTCP command, force upper case on CTCP replies (closes #1439) 2020-01-11 11:02:41 +01:00