Sébastien Helleu
8560b09dad
relay: add missing gcrypt lib in CMake and autotools files
...
This fixes build on Cygwin.
2020-04-15 22:50:27 +02:00
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
ccd45e4921
relay: update message displayed when the client is connected/authenticated
2020-04-12 20:24:39 +02:00
Sébastien Helleu
b947512c9a
relay: add option relay.network.auth_timeout
2020-04-12 19:36:12 +02:00
Sébastien Helleu
fb6fc22c74
relay: add a function to send outqueue to the client
2020-04-12 19:25:21 +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
07505bb53c
relay: add comments in truct t_relay_weechat_data
2020-04-12 15:35:03 +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
007fd03bc8
tests: add tests on calc functions
...
Functions tested:
- calc_operator_precedence
- calc_pop_value
- calc_list_free_cb
- calc_operation
- calc_operation_stacks
2020-04-08 21:38:51 +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
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
2f8fd4c0ef
fset: fix help on options fset.format.option1 and fset.format.option2
2020-04-02 20:38:37 +02:00
Sébastien Helleu
4481b93d35
irc: add missing modifier "irc_color_decode_ansi" in comment on function irc_color_modifier_cb
2020-03-30 07:31:11 +02:00
Sébastien Helleu
03ffd396a4
irc: move functions irc_protocol_get_message_tags and irc_protocol_parse_time before protocol callbacks
2020-03-28 13:39:48 +01:00
Sébastien Helleu
2efad93220
irc: remove empty lines
2020-03-28 10:36:10 +01:00
Sébastien Helleu
349251feb1
irc: fix typo in description of message 001
2020-03-27 22:51:15 +01:00
Sébastien Helleu
0834286843
irc: add examples of NOTICE and PRIVMSG messages to channel ops
2020-03-27 22:50:52 +01:00
Sébastien Helleu
fa931b46eb
core: fix compiler warnings on Cygwin
2020-03-23 07:23:08 +01:00
Sébastien Helleu
5ca64fc389
ruby: fix compiler warning on third argument of function weechat_ruby_hash_foreach_cb
2020-03-22 10:29:53 +01:00
Sébastien Helleu
c14d5ba004
irc: use larger buffer for message in function irc_message_split_authenticate, just in case
2020-03-21 14:31:53 +01: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
bf42a1ebc5
irc: replace "char *" by "const char *" in arguments of split functions
2020-03-21 14:27:47 +01:00
Sébastien Helleu
c29b45a0f2
api: add info "auto_connect" ( closes #1453 )
2020-03-20 20:42:05 +01:00
Sébastien Helleu
e3ffe8c785
irc: set channel modes to NULL instead of "+" when no modes are remaining
2020-03-15 07:19:16 +01:00
Sébastien Helleu
4033c55fa2
irc: add another example of MODE message
2020-03-15 07:19:16 +01:00
Sébastien Helleu
00913de02f
irc: remove unused variable "modes" from function irc_bar_item_buffer_name_content
2020-03-15 07:19:16 +01:00
Sébastien Helleu
ba70173a2e
irc: fix variable name in function irc_server_connect when GnuTLS is disabled
2020-03-12 07:35:04 +01:00
Sébastien Helleu
5f94636b91
irc: rename argument in function irc_protocol_is_numeric_command
2020-03-10 19:19:38 +01:00
Sébastien Helleu
2fe27584ff
irc: return 0 in function irc_protocol_is_numeric_command if the command is NULL or empty
2020-03-10 19:15:59 +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
7af8e6c652
core: add minimum libgcypt version 1.7.0 for SHA3 algorithms in comment of function weecrypto_hash
2020-03-02 22:57:44 +01:00
Sébastien Helleu
3604abba7d
core: fix copyright date in wee-crypto sources
2020-03-02 22:57:39 +01:00
Sébastien Helleu
2d7829b2d5
core: require libgcrypt >= 1.7.0 for SHA3 algorithms
2020-03-02 21:49:30 +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
1882686f8a
script: rename variable length_hash to hash_size
2020-03-01 23:14:55 +01:00
Sébastien Helleu
0271eacbe5
relay: rename variable length_hash to hash_size
2020-03-01 23:14:55 +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
1ae2591458
core: add function secure_hash_pbkdf2
2020-03-01 14:26:24 +01:00
Sébastien Helleu
3472793d24
script: call function string_hash in script_repo_sha512sum_file to compute SHA512 hash
...
This removes dependency on libgcrypt in script plugin.
2020-03-01 09:08:48 +01:00
Sébastien Helleu
bb363ab27f
relay: call function string_hash_binary in relay_websocket_build_handshake to compute SHA1 hash
...
This removes dependency on libgcrypt in relay plugin.
2020-03-01 09:03:49 +01:00
Sébastien Helleu
7449bc8827
core: add support of CRC32 algorithm in hash functions
2020-02-29 21:12:13 +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
7e808e2ef7
core: call function secure_hash_binary in secure_derive_key to compute SHA512 hash
2020-02-29 15:46:25 +01:00
Sébastien Helleu
45fd04ee72
core: return 0 in case of invalid parameters received in function secure_derive_key
2020-02-29 15:46:25 +01:00