From 0412fc0f40d874f7b6370713e9d02bf783e6c254 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 4 Oct 2021 22:53:38 +0100 Subject: Fix parsing the Sec-WebSocket-Protocol header. --- src/modules/m_websocket.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/m_websocket.cpp b/src/modules/m_websocket.cpp index 58ce8507d..c70fd2c73 100644 --- a/src/modules/m_websocket.cpp +++ b/src/modules/m_websocket.cpp @@ -415,9 +415,11 @@ class WebSocketHook : public IOHookMiddle HTTPHeaderFinder protocolheader; if (protocolheader.Find(recvq, "Sec-WebSocket-Protocol:", 23, reqend)) { - irc::spacesepstream protostream(protocolheader.ExtractValue(recvq)); + irc::commasepstream protostream(protocolheader.ExtractValue(recvq)); for (std::string proto; protostream.GetToken(proto); ) { + proto.erase(std::remove_if(proto.begin(), proto.end(), ::isspace), proto.end()); + bool is_binary = stdalgo::string::equalsci(proto, "binary.inspircd.org"); bool is_text = stdalgo::string::equalsci(proto, "text.inspircd.org"); -- cgit v1.3.1-10-gc9f91 From 943f8f987382ebefac12bc1447551427b2551d09 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 5 Oct 2021 12:35:16 +0100 Subject: Make the deprecation of LibreSSL support more explicit. --- src/modules/extra/m_ssl_openssl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index a42e81cab..dda3195af 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -58,7 +58,7 @@ #if defined __GNUC__ && defined LIBRESSL_VERSION_NUMBER # undef OPENSSL_VERSION_NUMBER # define OPENSSL_VERSION_NUMBER 0x10000000L -# warning LibreSSL support will be discontinued in the future. Consider using the ssl_gnutls or ssl_mbedtls modules instead. +# warning LibreSSL support will be removed in v4. Consider using the ssl_gnutls or ssl_mbedtls modules instead if you can not use OpenSSL. #endif // Fix warnings about the use of `long long` on C++03. -- cgit v1.3.1-10-gc9f91