From d596226ddc9354106e2478cd780d22cf68f05a70 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sun, 20 Nov 2016 23:51:03 +0000 Subject: [PATCH 1/7] ZNC 1.6.4-rc1 --- configure.ac | 2 +- include/znc/version.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 566b5239..678c4084 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ AC_DEFUN([AC_PROG_CC], [m4_errprint(__file__:__line__[: Something is trying to u dnl Needed for AC_PATH_PROGS_FEATURE_CHECK which was added in 2.62 AC_PREREQ([2.62]) dnl Keep the version number in sync with version.h! -AC_INIT([znc], [1.6.x]) +AC_INIT([znc], [1.6.4-rc1]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src/znc.cpp]) AC_LANG([C++]) diff --git a/include/znc/version.h b/include/znc/version.h index 14d7bf16..26ef039a 100644 --- a/include/znc/version.h +++ b/include/znc/version.h @@ -4,9 +4,9 @@ // The following defines are for #if comparison (preprocessor only likes ints) #define VERSION_MAJOR 1 #define VERSION_MINOR 6 -#define VERSION_PATCH -1 +#define VERSION_PATCH 4 // This one is for display purpose -#define VERSION_STR "1.6.x" +#define VERSION_STR "1.6.4" // This one is for ZNCModInfo #define VERSION (VERSION_MAJOR + VERSION_MINOR / 10.0) From 0aa3f7e36243da90c06979127c35d46a7c5fcec9 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Tue, 22 Nov 2016 23:50:32 +0000 Subject: [PATCH 2/7] route_replies: fix module to check if we are not connected to a network. Cherry-pick of 34db7be4ae751ee8b7cac8429c1aba601a882e0e --- modules/route_replies.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/route_replies.cpp b/modules/route_replies.cpp index c0ce7a48..aa3ef65b 100644 --- a/modules/route_replies.cpp +++ b/modules/route_replies.cpp @@ -310,9 +310,9 @@ public: virtual EModRet OnUserRaw(CString& sLine) override { CString sCmd = sLine.Token(0).AsUpper(); - - if (!GetNetwork()->GetIRCSock()) - return CONTINUE; + if (!GetNetwork()->GetIRCSock() || + !GetNetwork()->GetIRCSock()->IsConnected()) + return CONTINUE; if (sCmd.Equals("MODE")) { // Check if this is a mode request that needs to be handled From 63a2fbc634e452745e95ddd15fc1becc772ad2cf Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Thu, 1 Dec 2016 23:23:56 +0000 Subject: [PATCH 3/7] Don't reset module's attributes to NULL during CALLMOD. It conflicted with nested calls to a module. Such calls usually don't happen, but could be triggered using alias module. In this case m_pClient became NULL while executing the alias, and the rest of that alias caused segfault. Fix #1347 --- src/Client.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Client.cpp b/src/Client.cpp index e6e741f5..6846ba8e 100644 --- a/src/Client.cpp +++ b/src/Client.cpp @@ -28,9 +28,10 @@ using std::vector; CModule *pModule = NULL; \ if (NETWORK && (pModule = (NETWORK)->GetModules().FindModule(MOD))) { \ try { \ + CClient* pOldClient = pModule->GetClient(); \ pModule->SetClient(CLIENT); \ pModule->FUNC; \ - pModule->SetClient(NULL); \ + pModule->SetClient(pOldClient); \ } catch (const CModule::EModException& e) { \ if (e == CModule::UNLOAD) { \ (NETWORK)->GetModules().UnloadModule(MOD); \ @@ -38,11 +39,13 @@ using std::vector; } \ } else if ((pModule = (USER)->GetModules().FindModule(MOD))) { \ try { \ + CClient* pOldClient = pModule->GetClient(); \ + CIRCNetwork* pOldNetwork = pModule->GetNetwork(); \ pModule->SetClient(CLIENT); \ pModule->SetNetwork(NETWORK); \ pModule->FUNC; \ - pModule->SetClient(NULL); \ - pModule->SetNetwork(NULL); \ + pModule->SetClient(pOldClient); \ + pModule->SetNetwork(pOldNetwork); \ } catch (const CModule::EModException& e) { \ if (e == CModule::UNLOAD) { \ (USER)->GetModules().UnloadModule(MOD); \ @@ -50,13 +53,16 @@ using std::vector; } \ } else if ((pModule = CZNC::Get().GetModules().FindModule(MOD))) { \ try { \ + CClient* pOldClient = pModule->GetClient(); \ + CIRCNetwork* pOldNetwork = pModule->GetNetwork(); \ + CUser* pOldUser = pModule->GetUser(); \ pModule->SetClient(CLIENT); \ pModule->SetNetwork(NETWORK); \ pModule->SetUser(USER); \ pModule->FUNC; \ - pModule->SetClient(NULL); \ - pModule->SetNetwork(NULL); \ - pModule->SetUser(NULL); \ + pModule->SetClient(pOldClient); \ + pModule->SetNetwork(pOldNetwork); \ + pModule->SetUser(pOldUser); \ } catch (const CModule::EModException& e) { \ if (e == CModule::UNLOAD) { \ CZNC::Get().GetModules().UnloadModule(MOD); \ From 1a897403350b5fd51b415a02b15b2f92d0afd65a Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 3 Dec 2016 19:08:56 +0000 Subject: [PATCH 4/7] Stop-gap for OpenSSL 1.1 in 1.6 branch. This is properly fixed already in 1.7 branch. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 678c4084..5d925e78 100644 --- a/configure.ac +++ b/configure.ac @@ -27,7 +27,7 @@ AC_DEFUN([ZNC_AUTO_FAIL], [ ]) # AC_PROG_CXX sets CXXFLAGS to "-O2 -g" if it is unset which we don't want -CXXFLAGS="$CXXFLAGS " +CXXFLAGS="$CXXFLAGS -DOPENSSL_NO_COMP=1" AC_PROG_CXX # "Optional" because we want custom error message AX_CXX_COMPILE_STDCXX_11([noext], [optional]) From 3bd46744cca73d9abecdb1e9cc4fe6a44b184233 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 3 Dec 2016 19:23:00 +0000 Subject: [PATCH 5/7] 1.6.4-rc3 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5d925e78..0a4cbfcb 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ AC_DEFUN([AC_PROG_CC], [m4_errprint(__file__:__line__[: Something is trying to u dnl Needed for AC_PATH_PROGS_FEATURE_CHECK which was added in 2.62 AC_PREREQ([2.62]) dnl Keep the version number in sync with version.h! -AC_INIT([znc], [1.6.4-rc1]) +AC_INIT([znc], [1.6.4-rc3]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src/znc.cpp]) AC_LANG([C++]) From ed71ad1e2b9673bbe9044a568212daaab3d512b0 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 10 Dec 2016 20:51:18 +0000 Subject: [PATCH 6/7] Increase the version number to 1.6.4 --- ChangeLog.md | 20 ++++++++++++++++++++ configure.ac | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index 5337647b..a304d2fa 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,23 @@ +# ZNC 1.6.4 (2016-12-10) + +## Fixes + +* Fixed build with OpenSSL 1.1. +* Fixed build on Cygwin. +* Fixed a segfault after cloning a user. The bug was introduced in ZNC 1.6.0. +* Fixed a segfault when deleting a user or network which is waiting for DNS + during connection. The bug was introduced in ZNC 1.0. +* Fixed a segfault which could be triggered using alias module. +* Fixed an error in controlpanel module when setting the bindhost of another user. +* Fixed route_replies to not cause client to disconnect by timeout. +* Fixed compatibility with the Gitter IRC bridge. + +## Internal +* Fixed `OnInvite` for modpython and modperl. +* Fixed external location of GoogleTest for `make test`. + + + # ZNC 1.6.3 (2016-02-16) ## Core diff --git a/configure.ac b/configure.ac index 0a4cbfcb..8ec48760 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ AC_DEFUN([AC_PROG_CC], [m4_errprint(__file__:__line__[: Something is trying to u dnl Needed for AC_PATH_PROGS_FEATURE_CHECK which was added in 2.62 AC_PREREQ([2.62]) dnl Keep the version number in sync with version.h! -AC_INIT([znc], [1.6.4-rc3]) +AC_INIT([znc], [1.6.4]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src/znc.cpp]) AC_LANG([C++]) From 3d386aff19e68b7540c5d14f3e7781821dfb6f4c Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 10 Dec 2016 21:07:02 +0000 Subject: [PATCH 7/7] Return version number to 1.6.x --- configure.ac | 2 +- include/znc/version.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 8ec48760..74b9382c 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ AC_DEFUN([AC_PROG_CC], [m4_errprint(__file__:__line__[: Something is trying to u dnl Needed for AC_PATH_PROGS_FEATURE_CHECK which was added in 2.62 AC_PREREQ([2.62]) dnl Keep the version number in sync with version.h! -AC_INIT([znc], [1.6.4]) +AC_INIT([znc], [1.6.x]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src/znc.cpp]) AC_LANG([C++]) diff --git a/include/znc/version.h b/include/znc/version.h index 26ef039a..14d7bf16 100644 --- a/include/znc/version.h +++ b/include/znc/version.h @@ -4,9 +4,9 @@ // The following defines are for #if comparison (preprocessor only likes ints) #define VERSION_MAJOR 1 #define VERSION_MINOR 6 -#define VERSION_PATCH 4 +#define VERSION_PATCH -1 // This one is for display purpose -#define VERSION_STR "1.6.4" +#define VERSION_STR "1.6.x" // This one is for ZNCModInfo #define VERSION (VERSION_MAJOR + VERSION_MINOR / 10.0)