From 29fd2e772a6b4b9107daa4e3c237df454b055810 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Fri, 28 Jan 2022 17:02:19 +0100 Subject: [PATCH] ** UnrealIRCd 6.0.2 ** --- configure | 20 ++++++++++---------- configure.ac | 4 ++-- doc/Config.header | 2 +- doc/RELEASE-NOTES.md | 13 +++++++++---- extras/doxygen/Doxyfile | 2 +- include/version.h | 2 +- include/windows/setup.h | 2 +- src/modules/dccdeny.c | 13 +++++++------ src/modules/message.c | 6 +++--- src/version.c.SH | 2 +- src/windows/UnrealIRCd.exe.manifest | 4 ++-- src/windows/unrealinst.iss | 2 +- 12 files changed, 39 insertions(+), 33 deletions(-) diff --git a/configure b/configure index b194d789e..068c8f183 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unrealircd 6.0.2-rc1. +# Generated by GNU Autoconf 2.69 for unrealircd 6.0.2. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unrealircd' PACKAGE_TARNAME='unrealircd' -PACKAGE_VERSION='6.0.2-rc1' -PACKAGE_STRING='unrealircd 6.0.2-rc1' +PACKAGE_VERSION='6.0.2' +PACKAGE_STRING='unrealircd 6.0.2' PACKAGE_BUGREPORT='https://bugs.unrealircd.org/' PACKAGE_URL='https://unrealircd.org/' @@ -1347,7 +1347,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unrealircd 6.0.2-rc1 to adapt to many kinds of systems. +\`configure' configures unrealircd 6.0.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1413,7 +1413,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unrealircd 6.0.2-rc1:";; + short | recursive ) echo "Configuration of unrealircd 6.0.2:";; esac cat <<\_ACEOF @@ -1589,7 +1589,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unrealircd configure 6.0.2-rc1 +unrealircd configure 6.0.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1958,7 +1958,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unrealircd $as_me 6.0.2-rc1, which was +It was created by unrealircd $as_me 6.0.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2376,7 +2376,7 @@ _ACEOF # The version suffix such as a beta marker or release candidate # marker. (e.g.: -rcX for unrealircd-3.2.9-rcX). This macro is a # string instead of an integer because it contains arbitrary data. -UNREAL_VERSION_SUFFIX="-rc1" +UNREAL_VERSION_SUFFIX="" cat >>confdefs.h <<_ACEOF #define UNREAL_VERSION_SUFFIX "$UNREAL_VERSION_SUFFIX" @@ -9414,7 +9414,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unrealircd $as_me 6.0.2-rc1, which was +This file was extended by unrealircd $as_me 6.0.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9477,7 +9477,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unrealircd config.status 6.0.2-rc1 +unrealircd config.status 6.0.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 40758fb49..cf798e339 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ dnl src/windows/unrealinst.iss dnl doc/Config.header dnl src/version.c.SH -AC_INIT([unrealircd], [6.0.2-rc1], [https://bugs.unrealircd.org/], [], [https://unrealircd.org/]) +AC_INIT([unrealircd], [6.0.2], [https://bugs.unrealircd.org/], [], [https://unrealircd.org/]) AC_CONFIG_SRCDIR([src/ircd.c]) AC_CONFIG_HEADER([include/setup.h]) AC_CONFIG_AUX_DIR([autoconf]) @@ -40,7 +40,7 @@ AC_DEFINE_UNQUOTED([UNREAL_VERSION_MINOR], [$UNREAL_VERSION_MINOR], [Minor versi # The version suffix such as a beta marker or release candidate # marker. (e.g.: -rcX for unrealircd-3.2.9-rcX). This macro is a # string instead of an integer because it contains arbitrary data. -UNREAL_VERSION_SUFFIX=["-rc1"] +UNREAL_VERSION_SUFFIX=[""] AC_DEFINE_UNQUOTED([UNREAL_VERSION_SUFFIX], ["$UNREAL_VERSION_SUFFIX"], [Version suffix such as a beta marker or release candidate marker. (e.g.: -rcX for unrealircd-3.2.9-rcX)]) AC_PATH_PROG(RM,rm) diff --git a/doc/Config.header b/doc/Config.header index d667780a7..dd0c441d5 100644 --- a/doc/Config.header +++ b/doc/Config.header @@ -7,7 +7,7 @@ \___/|_| |_|_| \___|\__,_|_|\___/\_| \_| \____/\__,_| Configuration Program - for UnrealIRCd 6.0.2-rc1 + for UnrealIRCd 6.0.2 This program will help you to compile your IRC server, and ask you questions regarding the compile-time settings of it during the process. diff --git a/doc/RELEASE-NOTES.md b/doc/RELEASE-NOTES.md index 5a6d7101a..21190bfb6 100644 --- a/doc/RELEASE-NOTES.md +++ b/doc/RELEASE-NOTES.md @@ -1,13 +1,18 @@ -UnrealIRCd 6.0.2-rc1 -===================== -This is the release candidate for UnrealIRCd 6.0.2. You can help us by -testing this release and reporting any issues at https://bugs.unrealircd.org/. +UnrealIRCd 6.0.2 +================= +UnrealIRCd 6.0.2 comes with several nice feature enhancements along with +some fixes. It also includes a fix for a crash bug that can be triggered +by ordinary users. If you are already running UnrealIRCd 6 then read below on the fixes and nice new features in 6.0.2. Otherwise, jump straight to the [summary about UnrealIRCd 6](#Summary) to learn more about UnrealIRCd 6. Fixes: +* Fix crash that can be triggered by regular users if you have any `deny dcc` + blocks in the config or any spamfilters with the `d` (DCC) target. + NOTE: You don't *have* to upgrade to 6.0.2 to fix this, you can also + hot-patch this issue without restart, see the news announcement. * Windows: fix crash with IPv6 clients (local or remote) due to GeoIP lookup * Fix infinite hang on "Loading IRCd configuration" if DNS is not working. For example if the 1st DNS server in `/etc/resolv.conf` is down or refusing diff --git a/extras/doxygen/Doxyfile b/extras/doxygen/Doxyfile index 07506fab5..169ab1a4e 100644 --- a/extras/doxygen/Doxyfile +++ b/extras/doxygen/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "UnrealIRCd" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 6.0.2-rc1 +PROJECT_NUMBER = 6.0.2 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/include/version.h b/include/version.h index 00f5e621b..c1cfb406f 100644 --- a/include/version.h +++ b/include/version.h @@ -54,7 +54,7 @@ * Can be useful if the above 3 versionids are insufficient for you (eg: you want to support CVS). * This is updated automatically on the CVS server every Monday. so don't touch it. */ -#define UNREAL_VERSION_TIME 202148 +#define UNREAL_VERSION_TIME 202204 #define UNREAL_VERSION ((UNREAL_VERSION_GENERATION << 24) + (UNREAL_VERSION_MAJOR << 16) + (UNREAL_VERSION_MINOR << 8)) #define UnrealProtocol 6000 diff --git a/include/windows/setup.h b/include/windows/setup.h index 78b585d83..ad824a975 100644 --- a/include/windows/setup.h +++ b/include/windows/setup.h @@ -66,6 +66,6 @@ /* Version suffix such as a beta marker or release candidate marker. (e.g.: -rcX for unrealircd-3.2.9-rcX) */ -#define UNREAL_VERSION_SUFFIX "-rc1" +#define UNREAL_VERSION_SUFFIX "" #endif diff --git a/src/modules/dccdeny.c b/src/modules/dccdeny.c index 0fda03f0e..4fe3a2ef1 100644 --- a/src/modules/dccdeny.c +++ b/src/modules/dccdeny.c @@ -25,7 +25,7 @@ ModuleHeader MOD_HEADER = { "dccdeny", - "5.0", + "6.0.2", "command /dccdeny", "UnrealIRCd Team", "unrealircd-6", @@ -525,11 +525,8 @@ int dccdeny_can_send_to_channel(Client *client, Channel *channel, Membership *lp const char *filename = get_dcc_filename(*msg); if (filename && !can_dcc(client, channel->name, NULL, filename, &err)) { - if (!IsDead(client) && (sendtype != SEND_TYPE_NOTICE)) - { - strlcpy(errbuf, err, sizeof(errbuf)); - *errmsg = errbuf; - } + strlcpy(errbuf, err, sizeof(errbuf)); + *errmsg = errbuf; return HOOK_DENY; } } @@ -649,7 +646,11 @@ static int can_dcc(Client *client, const char *target, Client *targetcli, const } if (match_spamfilter(client, filename, SPAMF_DCC, "PRIVMSG", target, 0, NULL)) + { + /* Dirty hack, yeah spamfilter already sent the error message :( */ + *errmsg = ""; return 0; + } if ((fl = dcc_isforbidden(client, filename))) { diff --git a/src/modules/message.c b/src/modules/message.c index 279df2c91..62a1dbeae 100644 --- a/src/modules/message.c +++ b/src/modules/message.c @@ -37,7 +37,7 @@ long CAP_MESSAGE_TAGS = 0; /**< Looked up at MOD_LOAD, may stay 0 if message-tag ModuleHeader MOD_HEADER = { "message", /* Name of module */ - "5.0", /* Version */ + "6.0.2", /* Version */ "private message and notice", /* Short description of module */ "UnrealIRCd Team", "unrealircd-6", @@ -318,7 +318,7 @@ void cmd_message(Client *client, MessageTag *recv_mtags, int parc, const char *p */ if (IsDead(client)) return; - if (!IsDead(client) && (sendtype != SEND_TYPE_NOTICE) && errmsg) + if (!IsDead(client) && (sendtype != SEND_TYPE_NOTICE) && !BadPtr(errmsg)) sendnumeric(client, ERR_CANNOTSENDTOCHAN, channel->name, errmsg, p2); continue; /* skip delivery to this target */ } @@ -423,7 +423,7 @@ void cmd_message(Client *client, MessageTag *recv_mtags, int parc, const char *p /* Message is discarded */ if (IsDead(client)) return; - if ((sendtype != SEND_TYPE_NOTICE) && errmsg) + if ((sendtype != SEND_TYPE_NOTICE) && !BadPtr(errmsg)) sendnumeric(client, ERR_CANTSENDTOUSER, target->name, errmsg); } else { diff --git a/src/version.c.SH b/src/version.c.SH index fba386e71..ffc7730bc 100644 --- a/src/version.c.SH +++ b/src/version.c.SH @@ -7,7 +7,7 @@ echo "Extracting src/version.c..." if [ -d ../.git ]; then SUFFIX="-$(git rev-parse --short HEAD)" fi -id="6.0.2-rc1$SUFFIX" +id="6.0.2$SUFFIX" echo "$id" if test -r version.c diff --git a/src/windows/UnrealIRCd.exe.manifest b/src/windows/UnrealIRCd.exe.manifest index d45baa871..b8293eee2 100644 --- a/src/windows/UnrealIRCd.exe.manifest +++ b/src/windows/UnrealIRCd.exe.manifest @@ -3,7 +3,7 @@ Internet Relay Chat Daemon @@ -12,7 +12,7 @@