Commit Graph

4573 Commits

Author SHA1 Message Date
Alexey Sokolov 39646b620d Merge pull request #1327 from lol768/module_csrf_override
Module CSRF override support (mark II)

Close #1180
Close #1296
2016-10-08 23:31:06 +01:00
lol768 d40d87e268 Fix race condition by using ReadUntil per review 2016-10-05 09:32:02 +01:00
lol768 9cc59b2b78 Address review comment, module is already global
https://github.com/lol768/znc/commit/b94c639e6a1755c33cc315aad247bbc50a83209e#commitcomment-19252797
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
lol768 3930c5b34e Sample web API doesn't make sense as a user module 2016-10-05 09:29:40 +01:00
lol768 0393153a62 Allow anonymous access for sample mod
This makes testing simpler.
2016-10-05 09:29:40 +01:00
lol768 f387dc56c0 More relevant comments for CSRF behaviour 2016-10-05 09:29:40 +01:00
Latchezar Tzvetkoff a9a7f17910 Allow modules to override CSRF protection.
Useful for Web APIs and all other kinds of things.

API changes:
	- Added public CHTTPSock::GetURI() method
	- Added public CModule::ValidateWebRequestCSRFCheck() method
	- Made CWebSock::GetCSRFCheck() method public so it can be accessed
	  from CModule
	- Added public CWebSock::ValidateCSRFCheck() method

Other changes:
	- Added a Sample Web API module (modules/samplewebapi.cpp) and a
	  simple web form with no CSRF check.

Implements feature request #1180.
2016-10-05 09:29:40 +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
Jos Ahrens a6c79fa1e1 keepnick: improve behaviour by listening to ircd-side numeric errors (#1324)
Fixes #945
2016-10-03 23:23:45 +01:00
Jos Ahrens b6ffaa6527 Message.h: Add a comment briefly explaining how to use the class, and what exactly a message is. 2016-10-02 00:21:58 +01:00
Donovan Zimmerman 1417783758 nickserv: support messages from X3 services 2016-09-30 12:46:51 -04:00
Alexey Sokolov 4aa5e41465 Merge commit 'refs/pull/1319/head' of github.com:znc/znc 2016-09-23 21:59:09 +01:00
Alexey Sokolov f841decbf7 Merge commit 'refs/pull/1320/head' of github.com:znc/znc 2016-09-23 21:58:42 +01:00
Alexey Sokolov 2113ea4ac1 Try Codecov. It has better GUI than Coveralls.
For now both are enabled.
2016-09-23 21:57:00 +01:00
arza 7c53d2106f Hide passwords in listservers output 2016-09-23 18:13:07 +03:00
wolfy1339 00aadbaf91 Use <th> in <thead> instead of <td>
Ref: #1308
2016-09-22 12:39:00 -04:00
Alexey Sokolov ce79be8b0b Add test results to Jenkins 2016-09-22 01:41:25 +01:00
Alexey Sokolov 51c532839a Show jenkins badge through shields.io
It supports custom label, e.g. "freebsd" as here.

[skip ci]
2016-09-18 01:41:35 +01:00
Alexey Sokolov 2532aca967 Simplify jenkins file and enable integration test 2016-09-17 18:45:23 +01:00
Alexey Sokolov b56ab9106d Fix OpenSSL CMake build on OS X
See #1311
2016-09-17 16:54:13 +01:00
Alexey Sokolov dd21f8202e Jenkins: cleanup the workspace differently
git clean doesn't work
2016-09-17 11:09:56 +01:00
Alexey Sokolov 8a9ee77239 Jenkins should clean workspace before new build
if build agent is reused
2016-09-17 10:51:36 +01:00
Alexey Sokolov 682d2f1e01 Remove additional github commit status update from jenkins.
There is a status update already, which I didn't see during earlier
tests.
2016-09-17 09:09:30 +01:00
Alexey Sokolov be40b76a23 Add jenkins badge to readme 2016-09-17 02:41:01 +01:00
Alexey Sokolov 9cfc7e8a82 Add a Jenkins pipeline config to test ZNC on FreeBSD 2016-09-17 00:49:47 +01:00
Alexey Sokolov 3846813512 Merge branch '1.6.x'
Conflicts:
	modules/schat.cpp
	src/SSLVerifyHost.cpp
	src/Utils.cpp
2016-09-13 22:45:10 +01:00
Alexey Sokolov b7dcac5e5f Merge pull request #1311 from welwood08/openssl-1.1
OpenSSL 1.1 compatibility
2016-09-13 20:41:48 +01:00
William Elwood 853dcc211d Fix use of a feature deprecated in OpenSSL 1.1
If OpenSSL 1.1 is configured in such a way that features deprecated in 1.1.0 are not built, then compile errors would result here.
2016-09-13 11:51:13 +01:00
William Elwood 6a5c2c649d Fix use of a feature deprecated in OpenSSL 0.9.8
If OpenSSL 1.1 is configured in such a way that features deprecated in 0.9.8 are not built, then compile errors would result here.
I also noticed a potential memory leak where pRSA was not always freed before early return from this function - fixed by using C++11 unique_ptr.
2016-09-13 11:50:40 +01:00
William Elwood 03775fcdc5 Fix compile errors caused by OpenSSL 1.1 2016-09-12 23:39:19 +01:00
Alexey Sokolov 74e95ffdd9 Merge pull request #1314 from RealKindOne/master
route_replies: fix module to check if we are not connected to a network.

Close #1299
2016-09-12 23:18:57 +01:00
KindOne 34db7be4ae route_replies: fix module to check if we are not connected to a network.
psychon gets credit for this code change.
2016-09-12 04:45:15 -04:00
Alexey Sokolov 6a8fbbc933 Script modules should also use the new name of translation methods 2016-09-12 00:10:57 +01:00
Alexey Sokolov 3f1c27250c Fix warning in Utils.cpp 2016-09-12 00:07:29 +01:00
Alexey Sokolov cc653efb6b Rename translation methods to be not one letter.
It fixes several warnings, when the name was shadowed by a local "p".
2016-09-12 00:01:45 +01:00
Alexey Sokolov 187f617bbc Merge branch '1.6.x'
Close #1313
2016-09-09 21:14:00 +01:00
Alexey Sokolov debfdf6c02 Fix build on OS X after fixing build on Cygwin 2016-09-09 00:17:20 +01:00
Alexey Sokolov 1480177458 Merge branch '1.6.x' 2016-09-08 22:26:51 +01:00
Alexey Sokolov 9974b6692b Fix TSAN on Travis 2016-09-08 22:19:25 +01:00
Alexey Sokolov a964b2bbef Merge branch '1.6.x' of github.com:znc/znc into 1.6.x 2016-09-08 22:14:47 +01:00
Alexey Sokolov 14cef81bb5 Merge pull request #1312 from welwood08/gtest
Fix `make test` in 1.6.x
2016-09-04 22:02:43 +01:00
William Elwood f7d0f0ccb0 Fix make test in 1.6.x since GoogleTest has moved to new hosting 2016-09-04 12:08:29 +01:00
Alexey Sokolov c28a29076b Merge commit 'refs/pull/1308/head' of github.com:znc/znc 2016-08-25 23:15:27 +01:00
Alexey Sokolov 4bdf5c6f69 Reorder lines in .gitignore 2016-08-25 23:14:08 +01:00
xnrand 0653b7002a Update .gitignore to cover more generated files 2016-08-25 18:05:39 +02:00
Tyler Spivey c705eb8a64 Improve accessibility of add/edit channel 2016-08-24 00:42:47 -07:00
Tyler Spivey 400b3d9939 Improve accessibility of add/edit network 2016-08-24 00:42:47 -07:00