1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 12:56:37 +02:00

Compare commits

...

8 Commits

Author SHA1 Message Date
Sébastien Helleu 6b3398fcb5 Version 4.8.1 2025-12-01 19:43:41 +01:00
Sébastien Helleu 52c53d6985 core: add IRC SASL EXTERNAL in upgrade guidelines for version 4.8.0 2025-12-01 18:02:35 +01:00
Sébastien Helleu 608038374e irc: fix creation of irc.msgbuffer option without a server name
The regression was introduced by commit
1b669cd13c, which allowed a server name with
upper case but rejected a name or alias with upper case.

This commit fixed the creation of the option when the server name is not given,
so this command works again:

  /set irc.msgbuffer.whois current
2025-12-01 07:49:36 +01:00
Sébastien Helleu 7f3ad1c054 ci: add build with type "Release" and gcc hardened options in matrix 2025-11-30 14:19:25 +01:00
Sébastien Helleu 5d4546eb85 core: update ChangeLog (issue #2289) 2025-11-30 13:35:19 +01:00
Sébastien Helleu 00b7a656a7 Version 4.8.1-dev 2025-11-30 13:35:19 +01:00
Sébastien Helleu 3520c9af0f core: fix order of sections in ChangeLog 2025-11-30 11:34:44 +01:00
Sébastien Helleu a76bfb1f26 core: fix compiler warning on possible buffer overflow in function util_parse_time (issue #2289) 2025-11-30 11:32:27 +01:00
6 changed files with 69 additions and 45 deletions
+4
View File
@@ -116,6 +116,10 @@ jobs:
cc: "gcc" cc: "gcc"
cxx: "g++" cxx: "g++"
buildargs: "-G Ninja -DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON" buildargs: "-G Ninja -DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON"
- name: "gcc_release_hardened"
cc: "gcc"
cxx: "g++"
buildargs: "-DENABLE_TESTS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=\"-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3\" -DCMAKE_CXX_FLAGS=\"-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3\""
- name: "gcc_no_nls" - name: "gcc_no_nls"
cc: "gcc" cc: "gcc"
cxx: "g++" cxx: "g++"
+14 -7
View File
@@ -6,17 +6,17 @@ SPDX-License-Identifier: GPL-3.0-or-later
# WeeChat ChangeLog # WeeChat ChangeLog
## Version 4.8.1 (2025-12-01)
### Fixed
- core: fix buffer size in function util_parse_time, causing buffer overflow error in unit tests
- irc: fix creation of irc.msgbuffer option without a server name
## Version 4.8.0 (2025-11-30) ## Version 4.8.0 (2025-11-30)
_If you are upgrading: please see [UPGRADING.md](UPGRADING.md)._ _If you are upgrading: please see [UPGRADING.md](UPGRADING.md)._
### Added
- core: add option weechat.completion.cycle
- core: add hdata for hooks
- api: add functions util_parse_int, util_parse_long and util_parse_longlong
- buflist: add variable `${index_displayed}`
### Removed ### Removed
- irc: remove temporary servers and option irc.look.temporary_servers - irc: remove temporary servers and option irc.look.temporary_servers
@@ -39,6 +39,13 @@ _If you are upgrading: please see [UPGRADING.md](UPGRADING.md)._
- build: require Enchant v2 ([#2268](https://github.com/weechat/weechat/issues/2268)) - build: require Enchant v2 ([#2268](https://github.com/weechat/weechat/issues/2268))
- build: require Lua ≥ 5.3 ([#2268](https://github.com/weechat/weechat/issues/2268)) - build: require Lua ≥ 5.3 ([#2268](https://github.com/weechat/weechat/issues/2268))
### Added
- core: add option weechat.completion.cycle
- core: add hdata for hooks
- api: add functions util_parse_int, util_parse_long and util_parse_longlong
- buflist: add variable `${index_displayed}`
### Fixed ### Fixed
- core: display an error message in case of invalid parameters in commands `/bar`, `/buffer`, `/cursor`, `/print` and `/window` - core: display an error message in case of invalid parameters in commands `/bar`, `/buffer`, `/cursor`, `/print` and `/window`
+13
View File
@@ -24,6 +24,19 @@ converted to a standard server, and thus is saved in configuration file `irc.con
Servers can easily be removed with `/server del <name>`. Servers can easily be removed with `/server del <name>`.
### IRC SASL EXTERNAL
When server option `sasl_mechanism` is set to `external`, WeeChat now sends the
username defined in option `sasl_username` to the IRC server
(see issue [#2270](https://github.com/weechat/weechat/issues/2270)).
If you use the EXTERNAL mechanism and the username is set, you could either:
- reset `sasl_username` to an empty string, if the username is **not** needed on this server:
`/reset irc.server.xxx.sasl_username`
- set `sasl_username` to your actual username, if the username **is** required on this server:
`/set irc.server.xxx.sasl_username "user"`
### New time format in log files ### New time format in log files
The time format used in log files now uses UTC and precision of microsecond The time format used in log files now uses UTC and precision of microsecond
+9 -7
View File
@@ -417,7 +417,7 @@ int
util_parse_time (const char *datetime, struct timeval *tv) util_parse_time (const char *datetime, struct timeval *tv)
{ {
char *string, *pos, *pos2, *pos_colon, *pos_hyphen, *pos_dot; char *string, *pos, *pos2, *pos_colon, *pos_hyphen, *pos_dot;
char str_usec[16], *error, str_date[128], str_date2[256]; char str_usec[16], *error, str_date[128];
struct tm tm_date, tm_date_gm, tm_date_local, *local_time; struct tm tm_date, tm_date_gm, tm_date_local, *local_time;
time_t time_now, time_gm, time_local; time_t time_now, time_gm, time_local;
long long value; long long value;
@@ -441,21 +441,23 @@ util_parse_time (const char *datetime, struct timeval *tv)
if (pos_colon && !pos_hyphen) if (pos_colon && !pos_hyphen)
{ {
/* add current date: "19:04:55" -> "2025-08-30T19:04:55" */ /* add current date: "19:04:55" -> "2025-08-30T19:04:55" */
string = malloc (strlen (datetime) + 16 + 1);
if (!string)
return 0;
time_now = time (NULL); time_now = time (NULL);
local_time = localtime (&time_now); local_time = localtime (&time_now);
strftime (str_date, sizeof (str_date), "%Y-%m-%dT", local_time); strftime (str_date, sizeof (str_date), "%Y-%m-%dT", local_time);
snprintf (string, sizeof (str_date2), "%s%s", str_date, datetime); length = strlen (str_date) + strlen (datetime) + 1;
string = malloc (length);
if (!string)
return 0;
snprintf (string, length, "%s%s", str_date, datetime);
} }
else if (!pos_colon && pos_hyphen && (!pos_dot || (pos_hyphen < pos_dot))) else if (!pos_colon && pos_hyphen && (!pos_dot || (pos_hyphen < pos_dot)))
{ {
/* add time (midnight): "2025-08-30" -> "2025-08-30T00:00:00" */ /* add time (midnight): "2025-08-30" -> "2025-08-30T00:00:00" */
string = malloc (strlen (datetime) + 16 + 1); length = strlen (datetime) + 9 + 1;
string = malloc (length);
if (!string) if (!string)
return 0; return 0;
snprintf (string, sizeof (str_date2), "%sT00:00:00", datetime); snprintf (string, length, "%sT00:00:00", datetime);
} }
else else
{ {
+27 -29
View File
@@ -1577,7 +1577,8 @@ irc_config_msgbuffer_create_option_cb (const void *pointer, void *data,
const char *option_name, const char *value) const char *option_name, const char *value)
{ {
struct t_config_option *ptr_option; struct t_config_option *ptr_option;
char *pos, *name_lower; const char *pos;
char *name_lower;
int rc; int rc;
/* make C compiler happy */ /* make C compiler happy */
@@ -1605,36 +1606,33 @@ irc_config_msgbuffer_create_option_cb (const void *pointer, void *data,
if (value) if (value)
{ {
pos = strrchr (option_name, '.'); pos = strrchr (option_name, '.');
if (pos) pos = (pos) ? pos + 1 : option_name;
name_lower = weechat_string_tolower (pos);
if (name_lower && (strcmp (pos, name_lower) == 0))
{ {
pos++; ptr_option = weechat_config_new_option (
name_lower = weechat_string_tolower (pos); config_file, section,
if (name_lower && (strcmp (pos, name_lower) == 0)) option_name, "enum",
{ _("buffer used to display message received from IRC "
ptr_option = weechat_config_new_option ( "server"),
config_file, section, "weechat|server|current|private", 0, 0, value, value, 0,
option_name, "enum", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
_("buffer used to display message received from IRC " rc = (ptr_option) ?
"server"), WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE :
"weechat|server|current|private", 0, 0, value, value, 0, WEECHAT_CONFIG_OPTION_SET_ERROR;
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
rc = (ptr_option) ?
WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE :
WEECHAT_CONFIG_OPTION_SET_ERROR;
}
else
{
weechat_printf (
NULL,
_("%s%s: error: invalid option \"%s.%s\", the command "
"name or alias \"%s\" must be lower case"),
weechat_prefix ("error"), IRC_PLUGIN_NAME,
"irc.msgbuffer", option_name, pos);
free (name_lower);
return rc;
}
free (name_lower);
} }
else
{
weechat_printf (
NULL,
_("%s%s: error: invalid option \"%s.%s\", the command "
"name or alias \"%s\" must be lower case"),
weechat_prefix ("error"), IRC_PLUGIN_NAME,
"irc.msgbuffer", option_name, pos);
free (name_lower);
return rc;
}
free (name_lower);
} }
else else
rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; rc = WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE;
+2 -2
View File
@@ -41,8 +41,8 @@
# devel-number the devel version as hex number ("0x04010000" for "4.1.0-dev") # devel-number the devel version as hex number ("0x04010000" for "4.1.0-dev")
# #
weechat_stable="4.8.0" weechat_stable="4.8.1"
weechat_devel="4.8.0" weechat_devel="4.8.1"
stable_major=$(echo "${weechat_stable}" | cut -d"." -f1) stable_major=$(echo "${weechat_stable}" | cut -d"." -f1)
stable_minor=$(echo "${weechat_stable}" | cut -d"." -f2) stable_minor=$(echo "${weechat_stable}" | cut -d"." -f2)