This is superior to DH-BLOWFISH as Blowfish may suffer from certain
classes of weak keys, which is difficult to mitigate against without
regenerating DH parameters repeatedly. AES also has faced far more
scrutiny and is believed to be more secure.
Reference implementation (services-side):
https://github.com/atheme/atheme/blob/master/modules/saslserv/dh-aes.c
Previously, version.sh got the path to git as its first and only argument. Since
the previous commit, this is not the path to src/version.cpp and the second
argument is the path to git.
However, let's assume someone does "git pull && make". They still have the old
Makefile laying around, which will pass the path to git as the first argument to
version.sh. Thus, this will overwrite /usr/bin/git with some generated source
code. Whoops.
Thanks to KindOne for reporting this problem!
Signed-off-by: Uli Schlachter <psychon@znc.in>
Instead of doing magic with the result from version.sh so that we can add a
preprocessor macro, the script now just writes src/version.cpp with the expected
content. This should fix all the various issues that we have with quoting the
arguments and things that go wrong when not building znc from a git clone.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In GetAvailableMods() modules paths were returned like "moddir//module.pm",
but when they are loaded, they use path "moddir/module.pm".
Because of that our hack of cleaning %INC when the module is unloaded,
which enables UpdateMod, removed wrong record from %INC, left right
record in it, and erased the module's namespace.
When the module was loaded again, the namespace was not restored,
because "require" didn't load the module, because it was still in %INC.
So, when we call a function of that module, the function does not exist
anymore.
This just moves the pipe from the socket code to the thread pool. However, now
all CJobs can use this and there is a single place for them to get deleted.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This should make it easier to work with threads. It provides classes for mutexes
and condition variables. Additionally, there is a special CMutexGuard that
automatically unlocks the mutex on destruction and a CThreadPool class.
This thread pool is used to replace the thread pool in the sockets code.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This fixes a bug in which providing empty data for the 'disconnect' command for controlpanel will return the 'reconnect' command's syntax help, which can confuse users.
Normally, when the Makefile calls swig, the resulting files end up in the build
directory. However, when the files are pre-generated (e.g. as in the znc 1.0
tarball) and an out of tree build is used, they are in the source directory and
installation fails.
Thanks to Kinji for reporting this.
Signed-off-by: Uli Schlachter <psychon@znc.in>
If nicks are equal, it's not changed. The problem was that equality was
checked case-insensitively.
This makes some clients which compare nicks case-sensitively think that
JOINs which we send to them, are not related to the user, it's someone
else joining. So Konversation users which have lower case version of
their IRC nick configured in Konversation settings, didn't get their
channel opened when connecting to ZNC.
Thanks to Axanon for helping to investigate the issue.