Configuration option for allowed SSL ciphers [$35 awarded] #372

Closed
opened 2026-10-05 04:15:58 +02:00 by adam · 23 comments
Owner

Out of the box, znc allows very weak ciphers on the incoming SSL socket (e.g. RC4-MD5 and DES-CBC-SHA). I'd like to see a configuration option to specify the list of allowed ciphers, like Apache's SSLCipherSuite. I think CSocket allows configuring this with m_sCipherType.

Furthermore, it would be great if the server's cipher order would be preferred over the client's order (similar to setting Apache's SSLHonorCipherOrder to on).

--- The **[$35 bounty](https://www.bountysource.com/issues/3651542-configuration-option-for-allowed-ssl-ciphers?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** on this issue has been claimed at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
Out of the box, znc allows very weak ciphers on the incoming SSL socket (e.g. `RC4-MD5` and `DES-CBC-SHA`). I'd like to see a configuration option to specify the list of allowed ciphers, like Apache's `SSLCipherSuite`. I think CSocket allows configuring this with `m_sCipherType`. Furthermore, it would be great if the server's cipher order would be preferred over the client's order (similar to setting Apache's `SSLHonorCipherOrder` to `on`). ## <bountysource-plugin> --- The **[$35 bounty](https://www.bountysource.com/issues/3651542-configuration-option-for-allowed-ssl-ciphers?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** on this issue has been claimed at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github). </bountysource-plugin> <!-- github-sync-id:39907228 -->
adam closed this issue 2026-10-05 04:15:59 +02:00
Author
Owner

Hi,

i'm supporting this request. Also please allow to disable SSL / TLS compression to mitigate the "CRIME" attack (See: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-4929)

Hi, i'm supporting this request. Also please allow to disable SSL / TLS compression to mitigate the "CRIME" attack (See: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-4929) <!-- github-comment-id:54764118 -->
Author
Owner

Even worse than supporting horribly insecure ciphers is that SSLv2 protocol (insecure and broken for a good 20 years by now) is supported and can't be turned off. SSLv3 is on it's last limb as well. Both protocols should be turned off by default!

An option to configure a cipher suite then is absolutely needed. Honoring the order of the cipher string has to be a requirement, not an option.

Even worse than supporting horribly insecure ciphers is that SSLv2 protocol (insecure and broken for a good 20 years by now) is supported and can't be turned off. SSLv3 is on it's last limb as well. Both protocols should be turned off by default! An option to configure a cipher suite then is absolutely needed. Honoring the order of the cipher string has to be a requirement, not an option. <!-- github-comment-id:59109836 -->
Author
Owner

SSLv3 should officially be avoided since the POODLE vulnerability from yesterday (https://www.openssl.org/~bodo/ssl-poodle.pdf). ZNC should be at least give an option to disable SSL and only enable TLS. Should that be its own issue?

SSLv3 should officially be avoided since the POODLE vulnerability from yesterday (https://www.openssl.org/~bodo/ssl-poodle.pdf). ZNC should be at least give an option to disable SSL and only enable TLS. Should that be its own issue? <!-- github-comment-id:59266002 -->
Author
Owner

👍 The ability to disable SSLv3 and to disable insecure Ciphers would be a great addition.

:+1: The ability to disable SSLv3 and to disable insecure Ciphers would be a great addition. <!-- github-comment-id:59566719 -->
Author
Owner

Insecure cipher suites like SSLv3 and SSLv2 should really be disabled by default.

Insecure cipher suites like SSLv3 and SSLv2 should really be disabled by default. <!-- github-comment-id:59778886 -->
Author
Owner

SSLv3 and SSLv2 should really be disabled by default

Does it need configurability, and how much? Would one global option be enough, or would it need to be configurable separately for listeners and networks (or even servers)?

> SSLv3 and SSLv2 should really be disabled by default Does it need configurability, and how much? Would one global option be enough, or would it need to be configurable separately for listeners and networks (or even servers)? <!-- github-comment-id:60476425 -->
Author
Owner

SSLv3 and SSLv2 should really be disabled by default

Does it need configurability, and how much? Would one global option be enough,...

I think it would be enough if they were disabled, but if there was configuration option, one global option would be enough as if there was new vulnerability, people would have to visit all other places too to disable vulnerable option.

Maybe there should be option for those who stay in Debian Stable version, but they wouldn't be helped by it until Debian Stable got newer ZNC.

> > SSLv3 and SSLv2 should really be disabled by default > > Does it need configurability, and how much? Would one global option be enough,... I think it would be enough if they were disabled, but if there was configuration option, one global option would be enough as if there was new vulnerability, people would have to visit all other places too to disable vulnerable option. Maybe there should be option for those who stay in Debian Stable version, but they wouldn't be helped by it until Debian Stable got newer ZNC. <!-- github-comment-id:60481725 -->
Author
Owner
FYI https://github.com/jimloco/Csocket/pull/29 <!-- github-comment-id:60491044 -->
Author
Owner

Anyone wanna give it a try? https://github.com/jpnurmi/znc/commits/ssl-ciphers

Fetch to an existing znc clone:

 git fetch git://github.com/jpnurmi/znc.git ssl-ciphers && git cherry-pick FETCH_HEAD

A config in the global section:

SSLCiphers = ...
Anyone wanna give it a try? https://github.com/jpnurmi/znc/commits/ssl-ciphers Fetch to an existing znc clone: ``` git fetch git://github.com/jpnurmi/znc.git ssl-ciphers && git cherry-pick FETCH_HEAD ``` A config in the global section: ``` SSLCiphers = ... ``` <!-- github-comment-id:60491676 -->
Author
Owner

Can we bump another release for this bug?

For people with debian stable, maybe it is a good idea to push this into the debian security list.

Can we bump another release for this bug? For people with debian stable, maybe it is a good idea to push this into the debian security list. <!-- github-comment-id:60542188 -->
Author
Owner

For people with debian stable, maybe it is a good idea to push this into the debian security list.

Debian Stable has 2.1 years old ZNC 0.206 and there have also been other security issues during that time and many other changes, so I doubt they would do anything even now.

> For people with debian stable, maybe it is a good idea to push this into the debian security list. Debian Stable has 2.1 years old ZNC 0.206 and there have also been other security issues during that time and many other changes, so I doubt they would do anything even now. <!-- github-comment-id:60547113 -->
Author
Owner

For people with debian stable, maybe it is a good idea to push this into the debian security list.

Refs:

https://lists.debian.org/debian-security/2014/10/msg00057.html
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766957

> For people with debian stable, maybe it is a good idea to push this into the debian security list. Refs: https://lists.debian.org/debian-security/2014/10/msg00057.html https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766957 <!-- github-comment-id:60570770 -->
Author
Owner

Not sure if those are easy to apply to the older version 0.206-2 in Wheezy but want to report this anyway.

I think that you have bigger concerns than SSL ciphers if you use 0.206.

> Not sure if those are easy to apply to the older version 0.206-2 in Wheezy but want to report this anyway. I think that you have bigger concerns than SSL ciphers if you use 0.206. <!-- github-comment-id:60574752 -->
Author
Owner

TLS/SSL Compression should not be an option but always OFF. Multiple attacks against that problem known that has bitten us multiple times.

Same goes for SSLv2 (Insecure for 15 years) and SSLv3. As for TLS a details way to configure this with secure defaults is needed. Or we're facing the same dilemma of updating years after security problems arise again when TLS 1.0 is falling apart early 2015. Options to turn that OFF immediately can mitigate that. Separate options for Client-to-ZNC and ZNC-to-IRC are needed.

TLS/SSL Compression should not be an option but always OFF. Multiple attacks against that problem known that has bitten us multiple times. Same goes for SSLv2 (Insecure for 15 years) and SSLv3. As for TLS a details way to configure this with _secure_ defaults is needed. Or we're facing the same dilemma of updating years after security problems arise again when TLS 1.0 is falling apart early 2015. Options to turn that OFF immediately can mitigate that. Separate options for Client-to-ZNC and ZNC-to-IRC are needed. <!-- github-comment-id:60586870 -->
Author
Owner

@Mkaysi

I think that you have bigger concerns than SSL ciphers if you use 0.206.

Could you elaborate on this? Are those security concerns? Havn't found anything which looks critical after a short look at the znc changelogs since 0.206.

Thanks!

@Mkaysi > I think that you have bigger concerns than SSL ciphers if you use 0.206. Could you elaborate on this? Are those security concerns? Havn't found anything which looks critical after a short look at the znc changelogs since 0.206. Thanks! <!-- github-comment-id:60801077 -->
Author
Owner

Havn't found anything which looks critical after a short look at the znc changelogs since 0.206.

1.2 and 1.4 fixed several crashes, triggerable in various ways.

> Havn't found anything which looks critical after a short look at the znc changelogs since 0.206. 1.2 and 1.4 fixed several crashes, triggerable in various ways. <!-- github-comment-id:60881329 -->
Author
Owner

Hi,

1.2 and 1.4 fixed several crashes, triggerable in various ways.

thanks for the head-up. If those are just trigger crashes without a security risk then i can live with that.

Btw:

For people with debian stable, maybe it is a good idea to push this into the debian security list.

Seems those changes can't be applied to the debian 0.206 so it won't be backported by the maintainer:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766957#12

Hi, > 1.2 and 1.4 fixed several crashes, triggerable in various ways. thanks for the head-up. If those are just trigger crashes without a security risk then i can live with that. Btw: > For people with debian stable, maybe it is a good idea to push this into the debian security list. Seems those changes can't be applied to the debian 0.206 so it won't be backported by the maintainer: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766957#12 <!-- github-comment-id:60977454 -->
Author
Owner

trigger crashes without a security risk

We have different understanding of security then.

> trigger crashes without a security risk We have different understanding of security then. <!-- github-comment-id:61003242 -->
Author
Owner

We have different understanding of security then

Not different understandings but different scopes. As the changelogs mostly mentioning crashing via the webadmin modules and i'm the only user at this instance i can live with that.

> We have different understanding of security then Not different understandings but different scopes. As the changelogs mostly mentioning crashing via the webadmin modules and i'm the only user at this instance i can live with that. <!-- github-comment-id:61006243 -->
Author
Owner

Not every crash is because of webadmin, but ok :)

Not every crash is because of webadmin, but ok :) <!-- github-comment-id:61009922 -->
Author
Owner

Try

SSLCiphers = HIGH:MEDIUM:+TLSv1:!SSLv2:!SSLv3

Try SSLCiphers = HIGH:MEDIUM:+TLSv1:!SSLv2:!SSLv3 <!-- github-comment-id:61436606 -->
Author
Owner

@PVasileff @DarthGandalf

Two checks on the CipherString thing.
(1) Ran the cipher string through openssl ciphers -v and it's a valid cipher string. Ciphers output is as follows:

% openssl ciphers -v 'HIGH:MEDIUM:+TLSv1:!SSLv2:!SSLv3'
ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AESGCM(256) Mac=AEAD
ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AESGCM(256) Mac=AEAD
ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(256)  Mac=SHA384
ECDHE-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AES(256)  Mac=SHA384
DHE-DSS-AES256-GCM-SHA384 TLSv1.2 Kx=DH       Au=DSS  Enc=AESGCM(256) Mac=AEAD
DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH       Au=RSA  Enc=AESGCM(256) Mac=AEAD
DHE-RSA-AES256-SHA256   TLSv1.2 Kx=DH       Au=RSA  Enc=AES(256)  Mac=SHA256
DHE-DSS-AES256-SHA256   TLSv1.2 Kx=DH       Au=DSS  Enc=AES(256)  Mac=SHA256
ADH-AES256-GCM-SHA384   TLSv1.2 Kx=DH       Au=None Enc=AESGCM(256) Mac=AEAD
ADH-AES256-SHA256       TLSv1.2 Kx=DH       Au=None Enc=AES(256)  Mac=SHA256
ECDH-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AESGCM(256) Mac=AEAD
ECDH-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AESGCM(256) Mac=AEAD
ECDH-RSA-AES256-SHA384  TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AES(256)  Mac=SHA384
ECDH-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AES(256)  Mac=SHA384
AES256-GCM-SHA384       TLSv1.2 Kx=RSA      Au=RSA  Enc=AESGCM(256) Mac=AEAD
AES256-SHA256           TLSv1.2 Kx=RSA      Au=RSA  Enc=AES(256)  Mac=SHA256
ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AESGCM(128) Mac=AEAD
ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AESGCM(128) Mac=AEAD
ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(128)  Mac=SHA256
ECDHE-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AES(128)  Mac=SHA256
DHE-DSS-AES128-GCM-SHA256 TLSv1.2 Kx=DH       Au=DSS  Enc=AESGCM(128) Mac=AEAD
DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH       Au=RSA  Enc=AESGCM(128) Mac=AEAD
DHE-RSA-AES128-SHA256   TLSv1.2 Kx=DH       Au=RSA  Enc=AES(128)  Mac=SHA256
DHE-DSS-AES128-SHA256   TLSv1.2 Kx=DH       Au=DSS  Enc=AES(128)  Mac=SHA256
ADH-AES128-GCM-SHA256   TLSv1.2 Kx=DH       Au=None Enc=AESGCM(128) Mac=AEAD
ADH-AES128-SHA256       TLSv1.2 Kx=DH       Au=None Enc=AES(128)  Mac=SHA256
ECDH-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AESGCM(128) Mac=AEAD
ECDH-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AESGCM(128) Mac=AEAD
ECDH-RSA-AES128-SHA256  TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AES(128)  Mac=SHA256
ECDH-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AES(128)  Mac=SHA256
AES128-GCM-SHA256       TLSv1.2 Kx=RSA      Au=RSA  Enc=AESGCM(128) Mac=AEAD
AES128-SHA256           TLSv1.2 Kx=RSA      Au=RSA  Enc=AES(128)  Mac=SHA256

(2) Ran the cipher string in ZNC itself latest git master (downloaded and built a few minutes ago). Then ran a cipherscan on it. Below is the output:

Target: localhost:65534

prio  ciphersuite                  protocols  pfs_keysize
1     ECDHE-RSA-AES256-GCM-SHA384  TLSv1.2    ECDH,P-256,256bits
2     ECDHE-RSA-AES256-SHA384      TLSv1.2    ECDH,P-256,256bits
3     AES256-GCM-SHA384            TLSv1.2
4     AES256-SHA256                TLSv1.2
5     ECDHE-RSA-AES128-GCM-SHA256  TLSv1.2    ECDH,P-256,256bits
6     ECDHE-RSA-AES128-SHA256      TLSv1.2    ECDH,P-256,256bits
7     AES128-GCM-SHA256            TLSv1.2
8     AES128-SHA256                TLSv1.2

Certificate: UNTRUSTED, 2048 bit, sha1WithRSAEncryption signature
TLS ticket lifetime hint: 300
OCSP stapling: not supported
Client side cipher ordering

It looks like the cipher string works without a crash, on Ubuntu 14.04 and its OpenSSL version. Also looks like it's correctly working, in so much that the ciphers supported shown by the cipherscan all are included in the openssl cipherstring. Doesn't mean that ZNC can successfully implement all the cipher strings, just that they're included in there.

So unless I'm missing something, what is the problem? Is the concern that only the HIGH ciphers are actually being used?

@PVasileff @DarthGandalf Two checks on the CipherString thing. (1) Ran the cipher string through `openssl ciphers -v` and it's a valid cipher string. Ciphers output is as follows: ``` % openssl ciphers -v 'HIGH:MEDIUM:+TLSv1:!SSLv2:!SSLv3' ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(256) Mac=AEAD ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AES(256) Mac=SHA384 ECDHE-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AES(256) Mac=SHA384 DHE-DSS-AES256-GCM-SHA384 TLSv1.2 Kx=DH Au=DSS Enc=AESGCM(256) Mac=AEAD DHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(256) Mac=AEAD DHE-RSA-AES256-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AES(256) Mac=SHA256 DHE-DSS-AES256-SHA256 TLSv1.2 Kx=DH Au=DSS Enc=AES(256) Mac=SHA256 ADH-AES256-GCM-SHA384 TLSv1.2 Kx=DH Au=None Enc=AESGCM(256) Mac=AEAD ADH-AES256-SHA256 TLSv1.2 Kx=DH Au=None Enc=AES(256) Mac=SHA256 ECDH-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AESGCM(256) Mac=AEAD ECDH-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AESGCM(256) Mac=AEAD ECDH-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AES(256) Mac=SHA384 ECDH-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AES(256) Mac=SHA384 AES256-GCM-SHA384 TLSv1.2 Kx=RSA Au=RSA Enc=AESGCM(256) Mac=AEAD AES256-SHA256 TLSv1.2 Kx=RSA Au=RSA Enc=AES(256) Mac=SHA256 ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(128) Mac=AEAD ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(128) Mac=AEAD ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AES(128) Mac=SHA256 ECDHE-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AES(128) Mac=SHA256 DHE-DSS-AES128-GCM-SHA256 TLSv1.2 Kx=DH Au=DSS Enc=AESGCM(128) Mac=AEAD DHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AESGCM(128) Mac=AEAD DHE-RSA-AES128-SHA256 TLSv1.2 Kx=DH Au=RSA Enc=AES(128) Mac=SHA256 DHE-DSS-AES128-SHA256 TLSv1.2 Kx=DH Au=DSS Enc=AES(128) Mac=SHA256 ADH-AES128-GCM-SHA256 TLSv1.2 Kx=DH Au=None Enc=AESGCM(128) Mac=AEAD ADH-AES128-SHA256 TLSv1.2 Kx=DH Au=None Enc=AES(128) Mac=SHA256 ECDH-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AESGCM(128) Mac=AEAD ECDH-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AESGCM(128) Mac=AEAD ECDH-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH/RSA Au=ECDH Enc=AES(128) Mac=SHA256 ECDH-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH/ECDSA Au=ECDH Enc=AES(128) Mac=SHA256 AES128-GCM-SHA256 TLSv1.2 Kx=RSA Au=RSA Enc=AESGCM(128) Mac=AEAD AES128-SHA256 TLSv1.2 Kx=RSA Au=RSA Enc=AES(128) Mac=SHA256 ``` (2) Ran the cipher string in ZNC itself latest git master (downloaded and built a few minutes ago). Then ran a cipherscan on it. Below is the output: ``` Target: localhost:65534 prio ciphersuite protocols pfs_keysize 1 ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 ECDH,P-256,256bits 2 ECDHE-RSA-AES256-SHA384 TLSv1.2 ECDH,P-256,256bits 3 AES256-GCM-SHA384 TLSv1.2 4 AES256-SHA256 TLSv1.2 5 ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 ECDH,P-256,256bits 6 ECDHE-RSA-AES128-SHA256 TLSv1.2 ECDH,P-256,256bits 7 AES128-GCM-SHA256 TLSv1.2 8 AES128-SHA256 TLSv1.2 Certificate: UNTRUSTED, 2048 bit, sha1WithRSAEncryption signature TLS ticket lifetime hint: 300 OCSP stapling: not supported Client side cipher ordering ``` It looks like the cipher string works without a crash, on Ubuntu 14.04 and its OpenSSL version. Also looks like it's correctly working, in so much that the ciphers supported shown by the cipherscan all are included in the openssl cipherstring. Doesn't mean that ZNC can successfully implement all the cipher strings, just that they're included in there. So unless I'm missing something, what is the problem? Is the concern that only the HIGH ciphers are actually being used? <!-- github-comment-id:61715795 -->
Author
Owner

Notes on my last comment - see https://github.com/znc/znc/pull/728 for why we can't actually use the SSLCiphers line to disable SSLv3 with the suggested cipherstring from above.

Notes on my last comment - see https://github.com/znc/znc/pull/728 for why we can't actually use the SSLCiphers line to disable SSLv3 with the suggested cipherstring from above. <!-- github-comment-id:61861542 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#372