Commit Graph

150 Commits

Author SHA1 Message Date
Alexey Sokolov 9e941cb972 Fix test for autoconf build 2017-03-01 23:37:23 +00:00
Christophe Beauval cba58ca862 Add DH1080 keyexchange to the crypt module.
Close #1378
2017-03-01 01:16:06 +00:00
Alexey Sokolov 88d1e27cc6 Fix CMake build:
* VERSION_EXTRA is now supported
* znc-buildmod uses the correct ZNC library instead of one in /usr/share
2017-02-28 23:01:09 +00:00
Uli Schlachter 74bfbea6f2 Speed up FixCVE20149403 test
The test was unnecessarily waiting for ZNC to join some channel, which
took a long time.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-02-28 13:07:15 +01:00
Uli Schlachter 7b2a127841 Fix tests relying on table output
The output style of tables was recently changed. This broke the
ControlpanelModule integration test. Adapt some of the patterns used so
that they work again.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-02-28 12:59:00 +01:00
Uli Schlachter 1543635abf integration tests: Improve message when ZNC is missing
Previously, "more or less unrelated" things would fail. After this
change, also a message is printing that gives a hint on what went wrong.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-02-28 12:57:13 +01:00
Alexey Sokolov c803a85e13 Rename new On...Message modules callbacks to be more consistent.
OnPrivMessage -> OnPrivTextMessage
OnChanMessage -> OnChanTextMessage

Fix #1191
2016-12-25 15:48:29 +00:00
Alexey Sokolov 6fbab7b44c Add CIDR support to TrustedProxy setting
Fix #1219
2016-12-25 13:00:02 +00:00
lol768 d40d87e268 Fix race condition by using ReadUntil per review 2016-10-05 09:32:02 +01:00
lol768 e066f896ef Add integration test for module CSRF overrides 2016-10-05 09:32:02 +01:00
Alexey Sokolov 222ae86fcc Fix newest additions to keepnick module and write the test for it.
Fix the documentation.

See #1324 and #1325
2016-10-05 09:21:21 +01:00
Alexey Sokolov ac0048cc01 Make ZNC faster in the integration test.
This is not appropriate for normal usage.
2016-10-04 01:19:34 +01:00
Alexey Sokolov 87ca820bda Make integration test to load until module is loaded before testing it. 2016-10-03 23:55:35 +01:00
Alexey Sokolov 6708233479 Add more debug output to test which often hangs on cygwin 2016-07-30 09:19:52 +01:00
Alexey Sokolov e4194de153 Remove another line which I added only for debug... 2016-07-29 23:28:10 +01:00
Alexey Sokolov 8f61d9e182 Remove line which I added for debug... 2016-07-29 23:25:31 +01:00
Alexey Sokolov d95e0c7365 Combine test of buildmod to single file. 2016-07-29 23:21:08 +01:00
Alexey Sokolov 847f2baf24 Fix a null pointer dereference.
It sometimes happened when user attaches to a channel.

No released version is affected.

Thanks to Zoddo for the report!
2016-07-29 23:13:02 +01:00
Tor Arne Vestbø 02bfb9eaf5 Centralize logic to get current server time
A few different implementations of computing the current time were
spread out through the code base, most of them using gettimeofday().

This centralizes the logic in CUtil::GetTime() for easier maintenance,
and also allows all call sites to get the benefit of the clock_gettime()
code path on systems that support it.
2016-07-06 01:16:15 +02:00
Tor Arne Vestbø 852c9832a0 Fix inverted gettimeofday() return value handling
The gettimeofday function returns 0 for success, not for failure. As a
result of the inverted logic we were losing millisecond precision when
parsing incoming messages on non-HAVE_CLOCK_GETTIME systems (macOS).
2016-07-05 18:39:53 +02:00
Kyle Fuller cc674b28e8 [CString.StripControls] Improve test coverage formatting 2016-04-11 22:09:46 +01:00
Kyle Fuller 032f00732a [CString.StripControls] Srip bg colours when we reset fg 2016-04-11 22:09:40 +01:00
Alexey Sokolov 17e0d1031e Revert broken test of shell module... 2016-03-14 21:20:40 +00:00
Alexey Sokolov 2fdbe51df5 Fix #1248: segfault in shell module.
It happened when client disconnects.
2016-03-04 08:04:03 +00:00
Alexey Sokolov 9b31a077a5 Update integration test after change in webadmin 2016-02-24 23:01:39 +00:00
Alexey Sokolov 3dd8f4a214 Expand workaround for Qt on cygwin to 32 bit version 2016-01-16 21:41:09 +00:00
Alexey Sokolov f585c572ab Really fix cmake build when qt5 is not fully found
try_compile() errors out instead of just returning false when underlying
CMakeLists.txt fails :-(

Thanks kerio again
2016-01-16 17:11:53 +00:00
Alexey Sokolov a0c05b38f8 Fix CMake build when Qt5 is partially found
Thanks kerio for report
2016-01-16 16:36:32 +00:00
Alexey Sokolov 561a18054c Yet another attempt to use CMake 2016-01-15 10:50:33 +00:00
Alexey Sokolov 04ad80b86e Fix one more place in integration test
where executable was run from source dir.
2016-01-10 09:24:12 +00:00
Alexey Sokolov d13742b132 Add test for znc-buildmod 2016-01-09 22:01:33 +00:00
Alexey Sokolov c1595d0c19 Int test: run executable from installation dir instead of source 2016-01-09 20:47:00 +00:00
Alexey Sokolov ad0c332454 Add test for encoding change 2016-01-09 20:26:22 +00:00
Alexey Sokolov 1f226d2ade Add test for #1229 and actually fix it. 2016-01-09 18:00:47 +00:00
Alexey Sokolov 6a87ba3d4f Disable perl and python tests in coverage. 2016-01-09 15:15:43 +00:00
Alexey Sokolov 780659b139 Add basic tests for modperl and modpython 2016-01-07 00:52:52 +00:00
Falk Seidel 8f73840e74 Welcome to 2016
🎆  Happy 2016 🎆
2016-01-01 20:11:21 +01:00
Donal Cahill 15c200c908 Disallow CIDR /00000 2015-12-13 23:16:58 +00:00
Donal Cahill db7e1ef162 Fix up CIDR code. 2015-12-13 15:36:35 +00:00
Donal Cahill 56c97af14b Improve code quality. 2015-12-13 12:23:08 +00:00
Donal Cahill b4bb4fa0cd Add support for CIDR notation in allowed hosts list.
Fixes #207
2015-12-13 06:31:51 +00:00
Alexey Sokolov 16a8c77737 Replace virtual with override where possible.
Using clang-tidy
2015-12-08 20:51:50 +00:00
Alexey Sokolov d185d6f22d clang-format: switch tabs to spaces
I like tabs, but I have to admit that spaces make source code more
consistent, because every editor/viewer tends to render tabs differently :(
2015-12-07 00:53:30 +00:00
Alexey Sokolov 33b0627d75 Add clang-format configuration.
For now, it uses tabs like before, to make the diff easier to read/check.
One of following commits will switch it to spaces.
2015-12-07 00:53:01 +00:00
Alexey Sokolov 02f8749a8b Protect some parts of code from clang-format 2015-12-07 00:48:58 +00:00
Alexey Sokolov 9c48119897 Use C++11 threads instead of custom pthread wrappers.
Signal handling of CThread was handled in previous commit.
2015-12-06 00:11:15 +00:00
Alexey Sokolov 7f6fc6643e Merge branch 'master' into notify
Conflicts:
    test/Integration.cpp
2015-11-30 08:02:47 +00:00
Alexey Sokolov d736397194 Small change for test of notify_connect for better variety 2015-11-30 08:00:51 +00:00
Alexey Sokolov bee266a08e Fix test after fixing #1190 2015-11-29 12:26:17 +00:00
Alexey Sokolov 569f057561 Call CTCP callback for actions too, as it was before switch to CMessage.
Partyline had both of callbacks, one of which is redundant.

Fix #1134
Fix #1190
2015-11-29 00:59:50 +00:00