Fix interaction between self-message and CTCP:
CTCP request from client A gets reflected from ZNC to client B, because
B has self-message. B sees this as a usual CTCP request (from the same
nick), and replies (to the same nick). ZNC reflects that response to A
because A has self-message, and also passes that response to IRC server,
which sends that response back to ZNC, which sends it to its both clients.
Close#1488
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
bits are being set in file mode rather than open flags. As a result file permissions get strange bits set.
```
build# ls -l /etc/opt/znc/znc.conf
-rwS------ 1 znc znc 1.62K Feb 9 14:47 /var/opt/ooce/znc/configs/znc.conf
build# stat -c %a /etc/opt/znc/znc.conf
4600
```
Setting AuthOnlyViaModule on a user causes CheckPass to never return true,
causing all authentication attempts using the configured password to fail, both
on IRC connections and for webadmin. This is useful in situations where an
external module (cyrusauth, certauth, imapauth) handles authentication. Setting
the global AuthOnlyViaModule option causes similar behavior across every
user. If AuthOnlyViaModule is set to true globally, it cannot be overridden
per-user.
Close#1474Close#331
When connecting to many ZNC networks at once, one failed login causes numerous query windows from *status to pop up. These can be annoying to close depending on the client.
X509_get_subject_name() returns an internal pointer, which was destroyed
by X509_set_subject_name(), and then accessed again in
X509_set_issuer_name().
But X509_set_subject_name() isn't needed at all, because subject name
was modified in place.
While not kicking upon disconnect can cause desync with client and other
issues, there were multiple complains about the new behavior, and the
user should have the choice.
Revert 2f65dbbc64
Ref #968
Stop hardcoding Russian in webadmin.
Limit the setting in controlpanel to the known languages, because
untrusted language code might lead to some interesting vulnerabilities.
I noticed that the default network flood rates are wrong (for most
networks). It has been very standard since the beginning of IRC to use a
value of 2 seconds per line, with a 10 line head start. Almost all
networks work this way, and if you don't follow, having a lot of
channels or a lot of clients connected to ZNC results in excess flood
disconnections and much frustration for the user.
I think you should make the default value for these 2 and 9 instead of 1
and 4 so that this nasty bug doesn't hit people who will not know how to
debug it. You find these same types of settings built into every IRC
client. 2 and 10 is the standard. 2 and 9 provides a slight buffer so
there is no mistake.
Thanks
-Rubin
Close#1416
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.
Calls to CIRCSock::Quit() eventually result in the object's destructor
being called, which itself calls CIRCSock::Quit() again. Avoid sending
multiple quit messages to the remote server by checking if the
underlying socket is already marked for closing.