Commit Graph

391 Commits

Author SHA1 Message Date
Alexey Sokolov
28bee5aff3 Honor SSL ciphers in ZNC->Server connections 2014-11-26 22:31:12 +00:00
Alexey Sokolov
c94a8137de Update Csocket to 5746796ca55d21fa185caf7c58d015f650b77768 2014-11-26 21:36:17 +00:00
Alexey Sokolov
1b7c637dbd Merge pull request #753 from jpnurmi/listclients
ListClients: add identifier column
2014-11-20 20:53:50 +00:00
Alexey Sokolov
e2a4ebf838 Merge pull request #751 from jpnurmi/csocket
Update Csocket to b5185dc
2014-11-19 23:25:32 +00:00
Alexey Sokolov
eedeb07cfe Merge pull request #752 from jpnurmi/findclients
Replace CIRCNetwork::FindClient() with FindClients()
2014-11-19 21:42:53 +00:00
J-P Nurmi
d308d727f7 Replace CIRCNetwork::FindClient() with FindClients()
FindClient() is not enough, because there are no restrictions to used
identifiers. They don't necessarily need to be unique, and the same
identified client might re-connect meanwhile a ghost connection is
still hanging there.
2014-11-19 19:12:22 +01:00
J-P Nurmi
dd9c2b70d3 Update Csocket to b5185dc
> Fix IsConnected() to return false when Disconnected() gets called
2014-11-19 19:11:50 +01:00
J-P Nurmi
f4dc03b125 ListClients: add identifier column 2014-11-12 10:22:34 +01:00
J-P Nurmi
aed1d61a98 Revise CChan::JoinUser() & AttachUser()
The old AttachUser() that sent JOIN without topic or names replies
would leave clients in incomplete/broken state. JoinUser() was doing
two things; depending on passed arguments it was either joining user
on the channel on IRC, or attaching clients (properly). Now JoinUser()
joins the user on IRC, and AttachUser() attaches as expected from the
method names.
2014-11-10 22:24:34 +01:00
Alexey Sokolov
24a72d9a32 Merge branch 'lambda' 2014-11-08 16:39:41 +00:00
J-P Nurmi
b759c68847 Config option for SSL protocols (resolves #720)
ZNC currently disables SSLv2 and SSLv3 by default. To keep the ZNC
defaults (recommended, may change in the future versions) and for
example disable TLSv1 in addition, specify in the global config
section:

    SSLProtocols = -TLSv1

Available (case-insentive) values are:

    All, SSLv2, SSLv3, TLSv1, TLSv1.1, TLSv1.2

A non-prefixed "absolute" value overrides the ZNC defaults:

    SSLProtocols = TLSV1 +TLSv1.1 +TLSv1.2
2014-11-06 23:49:49 +01:00
J-P Nurmi
54e8b62b87 Fix #719: Disable SSL compression 2014-11-06 20:41:49 +01:00
J-P Nurmi
6ae9a439b2 Fix non-SSL build 2014-11-06 20:41:49 +01:00
J-P Nurmi
c8ea3d3875 Update Csocket to 1d7e685
> Extend EDisableProtocol
> missing ifdef for non-ssl
> added ability to disable compression
> added new callbacks for Certificate Verification and Handshake completion
> added SNI support for client and server, cleanup some of the certificate verification callback code
2014-11-06 20:40:42 +01:00
J-P Nurmi
20c9b19328 Add CIRCNetwork::FindClient(const CString& sIdentifier) 2014-11-04 00:42:31 +01:00
J-P Nurmi
8d77faa260 Allow clients to specify an ID via PASS or USER
- PASS [user[@identifier][/network]:]password
- USER user[@identifier][/network] ...

NOTE: There's a slight ambiguosity with the '@' character, which happens
to be a valid character in usernames, but also acts as a marker for the
identifier. Therefore, '@' is considered as part of the username if it's
followed by non-word characters (as in an email address), otherwise as
a marker for an identifier.

This is only an enabler for #343. The rest can be done with modules:
- managing client ID specific playback buffers
- filtering channels based on the client ID

The reason this should be part of ZNC core is that only global modules
have access to OnUnknownUserRaw(), which is needed to capture USER/PASS.
First of all, the aforementioned modules shouldn't be global. Furthermore,
it would be possible to have only one module that parsed and removed the
client ID so that ZNC core woulnd't choke.
2014-11-04 00:42:28 +01:00
J-P Nurmi
382ce76ded Add self-message support
https://github.com/ircv3/ircv3-specifications/blob/master/extensions/self-message-3.2.md
2014-11-02 16:59:17 +01:00
J-P Nurmi
8fdf51dfeb Fix CNick::Parse()
If the mask started with ':', the following '!' was included to nick.
2014-11-01 13:17:32 +01:00
J-P Nurmi
b822ea8e16 Fix #725: CHTTPSock memory leak - missing deflateEnd() call 2014-10-29 00:19:40 +01:00
Alexey Sokolov
6109c7d317 Merge pull request #714 from jpnurmi/clientcmd
Make Detach, EnableChan and DisableChan accept multiple channels
2014-10-26 22:44:11 +00:00
Alexey Sokolov
c1dc3e83d2 Support lambdas in module commands 2014-10-26 22:09:24 +00:00
J-P Nurmi
ba1b1da701 Make Detach, EnableChan and DisableChan accept multiple channels
These commands now take a comma/space separated list
2014-10-26 22:18:29 +01:00
Alexey Sokolov
19b4dbdaba Merge pull request #717 from jpnurmi/ssl-ciphers
Resolve #621: Config option for allowed SSL ciphers
2014-10-26 20:50:52 +00:00
J-P Nurmi
3d57ccb738 Resolve #621: Config option for allowed SSL ciphers
In the global section, for example:

    SSLCiphers = ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS

https://www.openssl.org/docs/apps/ciphers.html
https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers
2014-10-26 14:59:36 +01:00
Alexey Sokolov
e337cb433d Merge commit 'refs/pull/665/head' of github.com:znc/znc 2014-10-26 12:17:31 +00:00
Alexey Sokolov
4e79702142 Merge commit 'refs/pull/716/head' of github.com:znc/znc 2014-10-26 11:56:15 +00:00
Alexey Sokolov
4562f1c67b Merge commit 'refs/pull/705/head' of github.com:znc/znc 2014-10-26 11:44:35 +00:00
J-P Nurmi
954f22ccc0 Disable insecure SSLv2 & SSLv3 protocols (ref #621) 2014-10-26 11:58:33 +01:00
J-P Nurmi
9a8786377b Update Csocket to aefa339
> Support ECDHE exchange if available in OpenSSL
> add openssl's fix for POODLE bug in server mode.
> Give Csocket consumers the ability to disable less desirable protocols
2014-10-26 11:53:18 +01:00
J-P Nurmi
ba64324a39 Introduce patch level version number for bug fix releases
The patch level version number is ignored in module and config
version compatibility checks. Radically simplified, bug fix
releases shall not touch the headers nor change the config file.
2014-10-20 07:45:58 +02:00
J-P Nurmi
c424bd7aca CChan: keep track of the state
Make CChan keep track of the channel key, and schedule saving of the
config file when appropriate. This is more robust than trying to do
it from within the chansaver module.
2014-10-20 07:11:38 +02:00
J-P Nurmi
206c149f48 Scheduling of quiet vs. verbose config saving
Rename the current ECONFIG_NEED_WRITE to ECONFIG_NEED_VERBOSE_WRITE
as it always broadcasts the result for SIGUSR1, even on success.
Keep ECONFIG_NEED_WRITE for cases where the config should be written
without a notification of success.
2014-10-20 06:55:02 +02:00
Alexey Sokolov
a888d38511 Merge pull request #704 from jpnurmi/joindelay
Configurable join delay
2014-10-19 23:57:22 +01:00
J-P Nurmi
14e09e1a10 Retire awaynick (resolves #661)
== built-in awaynick ==

debug output on startup:

    [ .. ] Loading network module [awaynick]...
    [ !! ] Module [awaynick] aborted: retired module - see http://wiki.znc.in/awaynick
    [ .. ] Loading network module [simple_away] instead...
    [ >> ] [/Users/jpnurmi/znc/lib/znc/simple_away.so]

loadmod client command:

    <jpnurmi> loadmod awaynick
    <*status> Module [awaynick] aborted: retired module - see http://wiki.znc.in/awaynick

webadmin description:

    retired module - see http://wiki.znc.in/awaynick

webadmin load attempt:

    Unable to load module [awaynick] [Module [awaynick] aborted:
    retired module - see http://wiki.znc.in/awaynick]

== external awaynick ==

znc-buildmod:

    $ znc-buildmod awaynick.cpp
    Building "awaynick.so" for ZNC 1.5... [ ok ]

debug output on startup:

    [ .. ] Loading network module [awaynick]...
    [ >> ] [/Users/jpnurmi/.znc/modules/awaynick.so]

loadmod client command:

    <jpnurmi> loadmod awaynick
    <*status> Loaded module [awaynick] [/Users/jpnurmi/.znc/modules/awaynick.so]

webadmin description:

    Change your nick while you are away
2014-10-18 12:12:43 +02:00
J-P Nurmi
2286291d6b Add CUser::LoadModule() helper
Makes it easier to retry loading replacement modules when
loading retired modules fail.
2014-10-18 12:11:26 +02:00
J-P Nurmi
78a0331daa CIRCNetwork: add support for join delay (resolves #586) 2014-10-15 22:24:39 +02:00
J-P Nurmi
eaf2d737d7 Add CIRCNetwork::LoadModule() helper
Makes it easier to retry loading replacement modules when
loading retired modules fail.
2014-10-14 22:17:52 +02:00
J-P Nurmi
5206e71bdb Fix CModules::LoadModule() return message handling
[ >> ] This is an example[This is an example] [/path/to/mod.so]

becomes:

[ >> ] This is an example [/path/to/mod.so]
2014-10-14 22:17:52 +02:00
J-P Nurmi
cd94702b92 Write disabled status to chan config 2014-10-08 23:35:06 +02:00
J-P Nurmi
ef4caae6d1 const correctness fixes 2014-10-03 09:14:12 +02:00
J-P Nurmi
4fe249280e Fix GetClients() const correctness
It’s dangerous to give a non-const reference to an internal
container that the API users are not supposed to modify.
2014-10-03 09:11:03 +02:00
J-P Nurmi
d98094f564 Update Csocket to 71dac61
Csocket has received a bunch of const correctness fixes. Notice that
the signature of one virtual method, Csock::ConvertAddress(), has
changed => CZNCSock has been updated accordingly.
2014-10-02 19:51:41 +02:00
Alexey Sokolov
213c3839a8 Merge pull request #693 from jpnurmi/tags
Valueless & escaped message tags
2014-09-29 23:53:55 +01:00
Alexey Sokolov
0b22831958 Merge pull request #681 from jpnurmi/setuservars
Fix #680 - make channels follow user-level settings when appropriate
2014-09-29 23:46:38 +01:00
Alexey Sokolov
f4b8f69660 Merge pull request #689 from NuclearW/multitarget-notice+privmsg
Handle multi-receiver NOTICE and PRIVMSG
2014-09-29 23:41:14 +01:00
J-P Nurmi
6457bd6dc1 Fix #680 - make channels follow user-level settings when appropriate 2014-09-30 00:34:01 +02:00
J-P Nurmi
e20ac1a31e Add CString::Contains() for convenience
This is more convenient and readable than comparing Find() to npos,
which is a common task:

$ git grep "find(" | grep "npos" | wc -l
49
2014-09-30 00:15:34 +02:00
J-P Nurmi
5507e9a290 Add CString::Find() with case sensitivity support 2014-09-30 00:15:22 +02:00
J-P Nurmi
92c9a2e6ae Escape message tag values (ref #684) 2014-09-30 00:02:22 +02:00
J-P Nurmi
65f739980d CString::Starts/EndsWith(): allow specifying case sensitivity 2014-09-29 16:41:07 +02:00