Commit Graph

110 Commits

Author SHA1 Message Date
Alexey Sokolov
5befe2f7f8 Implement invite-notify 2025-04-18 22:23:01 +01:00
Alexey Sokolov
f93829e3b3 Implement message-tags spec
Message tags were supported already, but not arbitrary tags, and not
TAGMSG
2025-04-11 21:28:10 +01:00
Alexey Sokolov
af21753901 Rename saslplain to saslplainauth for consistency with other auth
modules
2025-02-22 16:03:46 +00:00
Alexey Sokolov
6e9980d67f Various SASL changes 2025-02-22 15:59:52 +00:00
Alexey Sokolov
4ef64eb4d5 rename next sasl module hook 2025-02-13 21:36:07 +00:00
Alexey Sokolov
c8266aafda Rename new callback, fix build 2025-02-13 21:22:09 +00:00
Alexey Sokolov
41a0030fdb Merge branch 'master' into sasl
Conflicts:
	include/znc/Client.h
	src/Client.cpp
	src/Modules.cpp
	test/integration/tests/modules.cpp
2025-02-13 20:37:32 +00:00
Peter
44e4b95a20 Welcome to 2025 (#1929) 2025-02-07 23:23:45 +00:00
Alexey Sokolov
efd136c01c Make modpython work with server-dependent caps 2024-01-14 11:12:32 +00:00
Alexey Sokolov
b1009bd809 Code cleanup
Since now there are no server-dependent caps defined in the core
2024-01-14 00:27:21 +00:00
Alexey Sokolov
f7ff0ee3f3 Modulefy core server-dependent caps 2024-01-13 23:34:03 +00:00
Alexey Sokolov
da3919245b Improve test 2024-01-13 22:07:40 +00:00
Alexey Sokolov
99e6869b28 Add CCapability 2024-01-13 21:22:42 +00:00
Alexey Sokolov
b5a6ff528b The test is now working 2024-01-07 22:55:52 +00:00
Alexey Sokolov
1d3b33354f Merge branch 'master' into cap302 2024-01-06 20:36:24 +00:00
Falk Rund
17a004aa0b Welcome to 2024
[skip ci]
2023-12-31 21:09:25 +01:00
delthas
1dd995ef77 Reabse and address PR comments 2023-08-31 14:35:49 +02:00
MrLenin
d27e2cce5c SASL Authentication for Clients 2023-08-30 17:25:32 +02:00
Alexey Sokolov
c15fc63c55 Implement cap negotiation 3.2 on server side
Used for "server-dependent" caps which already rely on sending NEW and
DEL to client. This functionality is not yet available for caps added by
modules.
2023-01-09 01:08:04 +00:00
Falk Rund
f9fd05c307 Welcome to 2023 2023-01-01 06:49:00 +01:00
Falk Rund
6402d241ac Welcome to 2022
The same procedure as last year, Miss Sophie?
Same procedure as every year, James.
2022-01-01 14:05:32 +01:00
MAGIC
99687b0f24 Welcome to 2021 2021-01-01 19:37:07 +01:00
MAGIC
9081aa971d Welcome to 2020 2020-01-02 00:36:05 +01:00
Alexey Sokolov
5c885f82b7 Merge pull request #1662 from girst/listify-tables
listify two-column tables
2019-06-21 21:52:29 +01:00
Alexey Sokolov
ac66d48430 Merge branch '1.7.x' 2019-06-15 02:02:42 +01:00
Alexey Sokolov
8de9e376ce Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.

Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.

CVE-2019-12816
2019-06-15 02:00:42 +01:00
girst
fe8d447a60 listify two-column tables
excluded are the Q and partyline modules, as they are deprecated. There
are some tables that have more than two columns, but could likely be
easily modified, but this will be attempted at a later time.
2019-05-29 18:49:18 +02:00
Alexey Sokolov
0ab205ccfa Merge pull request #1628 from dgw/welcome-to-2019
Welcome to 2019
2019-01-08 22:50:58 +00:00
dgw
8d5427cf9b Welcome to 2019
What are we going to do today, Brain?

The same thing we do every year, Pinky: Update all the copyright
headers!

[Skip CI]
2019-01-01 17:05:05 -06:00
Pierre Gordon
6af027c5dd Normalize methods with 'UserName' to 'Username' 2019-01-01 16:19:27 -05:00
Alexey Sokolov
0cbe9d783d Fix error message about wrong module type.
Regression from 1.6
2018-05-28 21:21:29 +01:00
Alexey Sokolov
1eceb5a5c7 More translateable strings (#1354) 2018-04-01 00:35:51 +01:00
Alexey Sokolov
a8d2df3852 Add PutIRC(CMessage) and PutIRCRaw()
Close #1193
2018-03-11 16:44:49 +00:00
Alexey Sokolov
a2470b3dd3 Make chan modes and permissions to be char instead of unsigned char.
Deprecate old module hooks which accept mode as unsigned char.

SWIG handles unsigned char as int, but char as a string.
Before this commit, usage of HasPerm from perl modules required this:
either $chan->HasPerm(ord('@')) or $chan->HasPerm(ord($ZNC::CChan::Op)).
Now ord() is not necessary, and these calls work too:
$chan->HasPerm('@') and $chan->HasPerm($ZNC::CChan::Op).

Fix #1486
2018-02-10 15:55:55 +00:00
Falk Seidel
d647eaabc0 Welcome to 2018
The same procedure as last year, Miss Sophie?
The same procedure as every year, James.

[skip ci]
2018-01-19 19:38:58 +00:00
Eli Young
823ac07240 Add OnSendToIRCMessage and OnSendToClientMessage
This also alters PutClient such that the CMessage variant handles
sending messages, rather than the CString variant. As a side bonus, this
gives callers better information on whether the message was sent to the
client. Additionally, it eliminates the need for a hook to let modules
set the tags sent to a client, as that can now be done inside
OnSendToClientMessage.
2017-04-18 15:43:16 -07:00
Phansa
3189ce7f8a Welcome to 2017
Welcome to 2017

temp

temp2
2017-03-12 20:34:26 -04:00
Alexey Sokolov
b4b085dc2d Partially fix type of function pointer.
Found using UBSan.
Full fix would require adding visibility attribute to CUser,
CIRCNetwork, CModule, CModuleEntry, CModInfo *and* make sure these
attributes are visible to enough code.
The second statement is more difficult to fulfill, because forward
declaration of CUser is not enough, because the attribute is on class
definition. So Modules.h would need to include many other includes.

Probably it should be changed at some point.

See http://stackoverflow.com/questions/27976687/clangs-ubsan-function-pointer-is-this-illegal
2016-12-26 20:09:13 +00:00
Alexey Sokolov
d9c1da8a68 Make it possible to translate arguments in help text of module commands
Ref #1354
2016-12-25 21:11:02 +00:00
Alexey Sokolov
a1e1591ba5 Add another layer of indirection for translation
To make supporting old modules easier

Ref #1354
2016-12-25 20:31:17 +00: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
13049e5fc3 Refactor the way how modules are loaded.
Make version checks more strict.

This finishes attempt to preserve ABI between patch versions. That
didn't work well, and the people who could make it work, left the
project already.

Close #1255
Close #1274
Close #172
2016-12-22 20:49:01 +00: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
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
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
Tor Arne Vestbø
4d5724eb0a Add OnPrivBufferStarting/Ending signals, similar to Chan buffers
Allows hooking into query buffer playback before and after all the
lines of the query buffer are replayed. The EModRet return value
has no effect at the moment, but may be used in the future to e.g.
prevent playback. The Chan version of these signals use EModRet to
skip emitting the status message, but not the whole playback.
2016-07-13 15:15:56 +02:00
Alexey Sokolov
8eeeaf71a0 Add framework for translating ZNC to different languages 2016-01-31 20:09:19 +00:00
Ondřej Nový
6881ca5b8f Fixed few misspellings 2016-01-05 20:45:08 +01:00
Falk Seidel
8f73840e74 Welcome to 2016
🎆  Happy 2016 🎆
2016-01-01 20:11:21 +01: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