Commit Graph

384 Commits

Author SHA1 Message Date
J-P Nurmi
be5f26ba18 Merge remote-tracking branch 'origin/1.6.x' 2015-02-23 09:39:12 +01:00
J-P Nurmi
696b07947a CString: fix 'comparision' typos in the docs 2015-02-23 09:36:26 +01:00
Alexey Sokolov
962cb945eb Merge pull request #869 from jpnurmi/wildcmp
CString::WildCmp(): add an optional case-sensitivity argument
2015-02-23 00:05:25 -08:00
J-P Nurmi
afaf255246 CString::WildCmp(): add an optional case-sensitivity argument
It's getting a common pattern to call AsLower() or MakeLower() on
the arguments passed to WildCmp(), we might as well add this for
convenience. It's tempting to make it case-insensitive by default,
since pretty much any IRC related comparison should be, but that
could potentially break some existing code.
2015-02-23 08:45:52 +01:00
OGAWA Hirofumi
c6d093a53a Change to return the value from OnUserQuit() as request 2015-02-22 04:33:15 +09:00
OGAWA Hirofumi
feec20b013 Add OnUserQuit() for extending clearbufferonmsg
Add OnUserQuit() callback. On smartphone, user doesn't want to see
same lines repeatedly. But, meanwhile, user doesn't want to miss lines
when connection was lost.

To do it, this uses OnUserQuit() callback. With this callback,
clearbufferonmsg can clear buffer if user quited client explicitly.
And when connection was lost, buffer is still not cleared.
2015-02-22 04:33:14 +09:00
J-P Nurmi
1f7fe5f576 Increase the version number to 1.6.1 2015-02-17 00:11:49 +01:00
J-P Nurmi
2397f8842a Bump the version to 1.7 2015-02-16 23:49:26 +01:00
Alexey Sokolov
f47e8465ef Increase the version number to 1.6.0 2015-02-12 21:05:44 +00:00
Alexey Sokolov
f9a4507669 Add a global setting whether to show ZNC version or not
Close #820
Close #821
2015-01-30 23:01:06 +00:00
OGAWA Hirofumi
b8dcb5f706 Don't polling to wait the exit of threads in CThreadPool destructor
All values are protected by m_mutex. So we don't need the polling to
wait m_num_threads==0 with wakeups, instead simply use CConditionVariable.
2015-01-25 21:55:42 +09:00
Alexey Sokolov
600f91f128 Fix implicit context of OnSendTo* hooks
Thanks for markus-j for reporting it
2015-01-11 17:08:00 +00:00
James Taylor
13f7574579 Change namespace for fcntl.h
* Fixes warnings under musl-libc.
* <fcntl.h> should be universal in the Unix world, it's more likely a system doesn't have <sys/fcntl.h> than if it doesn't have <fcntl.h> (and has <sys/fcntl.h>.)
2015-01-08 05:19:19 +00:00
Alexey Sokolov
9166e6ed40 Move Csocket to git submodule 2015-01-03 12:45:12 +00:00
Edoardo Spadolini
cac9da4951 Update Csocket to 0119a006bdfb6223a1a86d48b02efee87d11b721 2015-01-02 23:36:36 +01:00
Falk Seidel
2e29d49a53 Welcome to 2015 2014-12-31 11:28:38 +01:00
Alexey Sokolov
a0ec20b110 Fix HTTP basic auth.
It looks like it was broken since we implemented cookies...
2014-12-30 21:35:39 +00:00
Alexey Sokolov
d56621f9f6 Fix modperl startup 2014-12-25 16:36:55 +00:00
Alexey Sokolov
5c72c8232f Show fingerprints with colons 2014-12-23 00:58:59 +00:00
Alexey Sokolov
72ca970731 Make default ciphers a bit better 2014-12-23 00:57:59 +00:00
Alexey Sokolov
2aa6c7e1d9 Merge pull request #775 from DarthGandalf/table
Wrap lines in CTable
2014-12-22 15:18:15 +00:00
Alexey Sokolov
8930fc4d7a Don't break IRC control characters in some encodings
Fix #577
2014-12-21 17:09:59 +00:00
Alexey Sokolov
bd9450b99e Webadmin: Add GUI for character encoding 2014-12-21 17:08:41 +00:00
Alexey Sokolov
86e5ca3fd3 Update Csocket to 7c9c6ef676818457a952c2bda478ce7e27a928bf
* Add encoding mode which reads UTF-8 and something else, but sends UTF-8
* Expose encoding conversion error callbacks to subclasses
2014-12-21 17:07:29 +00:00
Alexey Sokolov
606ed8312d Wrap lines in CTable
See #743
2014-12-17 15:03:39 +00:00
Alexey Sokolov
c570b551aa Honor X-Forwarded-For of HTTP clients not only in web.
Fix #537
2014-12-16 10:50:06 +00:00
Alexey Sokolov
8bc433a576 Convert fingerprint to lower case when adding it. 2014-12-14 10:33:57 +00:00
Alexey Sokolov
c8f49e1da0 Merge pull request #754 from jpnurmi/ready
Add CClient::IsPlaybackActive()
2014-12-04 21:56:13 +00:00
Alexey Sokolov
6d7458c678 Merge branch 'ssl' 2014-12-02 21:24:49 +00:00
J-P Nurmi
efe1e1ee91 Add CClient::IsPlaybackActive()
To let modules know whether a client is currently in playback mode.
The clientbuffer module (#343) wants to update "last seen message"
timestamps in OnSendToClient() but it must avoid doing that while
in playback mode.
2014-12-01 11:47:24 +01:00
Alexey Sokolov
4442af724f Validate TLS certificate of IRC server.
Fix #156
2014-11-29 14:25:15 +00:00
J-P Nurmi
80b799cec0 Pass timestamp to playline hooks
This allows implementing timestamp-based (eg. client specific - #343)
filtering of playback buffers. For clients that don't support server-time,
getting an accurate timestamp out of a raw buffer playline is impossible.
2014-11-27 20:45:35 +01:00
Alexey Sokolov
c94a8137de Update Csocket to 5746796ca55d21fa185caf7c58d015f650b77768 2014-11-26 21:36:17 +00:00
Alexey Sokolov
abb0ca5bd3 Fix build without threads 2014-11-24 21:28:40 +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
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
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
Alexey Sokolov
c1dc3e83d2 Support lambdas in module commands 2014-10-26 22:09:24 +00: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