From 87145f5790f5f135517ab30cadbc6a56e0a531b8 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 7 Nov 2024 22:28:40 +0000 Subject: [PATCH 1/4] Backport support for the IRCv3 websocket subprotocols. --- src/modules/m_websocket.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/m_websocket.cpp b/src/modules/m_websocket.cpp index a88af2df5..81c22382b 100644 --- a/src/modules/m_websocket.cpp +++ b/src/modules/m_websocket.cpp @@ -450,8 +450,11 @@ class WebSocketHook : public IOHookMiddle { 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"); + bool is_binary = (sock->type == StreamSocket::SS_USER && stdalgo::string::equalsci(proto, "binary.ircv3.net")) + || stdalgo::string::equalsci(proto, "binary.inspircd.org"); + + bool is_text = (sock->type == StreamSocket::SS_USER && stdalgo::string::equalsci(proto, "text.ircv3.net")) + || stdalgo::string::equalsci(proto, "text.inspircd.org"); if (is_binary || is_text) { From 3cedada47b03b118a4a36616c9d9ff112abca74b Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 23 Dec 2024 15:18:23 +0000 Subject: [PATCH 2/4] Update vendored libraries. --- vendor/README.md | 2 +- vendor/utfcpp/core.h | 8 ++++---- vendor/utfcpp/unchecked.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vendor/README.md b/vendor/README.md index 3ab7cf62d..b9fd710d7 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -38,7 +38,7 @@ This directory contains vendored dependencies that are shipped with InspIRCd to **License** — Boost Software License -**Version** — v4.0.2 +**Version** — v4.0.6 **Website** — [https://github.com/nemtrif/utfcpp](https://github.com/nemtrif/utfcpp) diff --git a/vendor/utfcpp/core.h b/vendor/utfcpp/core.h index 4494c538e..627133c61 100644 --- a/vendor/utfcpp/core.h +++ b/vendor/utfcpp/core.h @@ -215,7 +215,7 @@ namespace internal UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) - code_point += (*it) & 0x3f; + code_point = static_cast(code_point + ((*it) & 0x3f)); return UTF8_OK; } @@ -234,11 +234,11 @@ namespace internal UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) - code_point += (utf8::internal::mask8(*it) << 6) & 0xfff; + code_point = static_cast(code_point + ((utf8::internal::mask8(*it) << 6) & 0xfff)); UTF8_CPP_INCREASE_AND_RETURN_ON_ERROR(it, end) - code_point += (*it) & 0x3f; + code_point = static_cast(code_point + ((*it) & 0x3f)); return UTF8_OK; } @@ -327,7 +327,7 @@ namespace internal else if (is_lead_surrogate(first_word)) { const utfchar16_t second_word = *it++; if (is_trail_surrogate(second_word)) { - code_point = (first_word << 10) + second_word + SURROGATE_OFFSET; + code_point = static_cast(first_word << 10) + second_word + SURROGATE_OFFSET; return UTF8_OK; } else err = INCOMPLETE_SEQUENCE; diff --git a/vendor/utfcpp/unchecked.h b/vendor/utfcpp/unchecked.h index 65d4948f2..bf2917893 100644 --- a/vendor/utfcpp/unchecked.h +++ b/vendor/utfcpp/unchecked.h @@ -115,15 +115,15 @@ namespace utf8 ++it; cp = ((cp << 12) & 0xffff) + ((utf8::internal::mask8(*it) << 6) & 0xfff); ++it; - cp += (*it) & 0x3f; + cp = static_cast(cp + ((*it) & 0x3f)); break; case 4: ++it; cp = ((cp << 18) & 0x1fffff) + ((utf8::internal::mask8(*it) << 12) & 0x3ffff); ++it; - cp += (utf8::internal::mask8(*it) << 6) & 0xfff; + cp = static_cast(cp + ((utf8::internal::mask8(*it) << 6) & 0xfff)); ++it; - cp += (*it) & 0x3f; + cp = static_cast(cp + ((*it) & 0x3f)); break; } ++it; From bc3ad1ba6dc567242cc2da483f600c5d1bb04e73 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 23 Dec 2024 15:21:37 +0000 Subject: [PATCH 3/4] Update the Windows dependencies. --- .github/workflows/ci-windows.yml | 2 +- win/conanfile.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index bea63d8bc..e467cf542 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -19,7 +19,7 @@ jobs: - name: Setup Conan uses: turtlebrowser/get-conan@v1.2 with: - version: 1.63.0 + version: 1.66.0 - name: Install libraries working-directory: ${{ github.workspace }}/win/build diff --git a/win/conanfile.txt b/win/conanfile.txt index 8c93c464c..7c9949014 100644 --- a/win/conanfile.txt +++ b/win/conanfile.txt @@ -10,11 +10,11 @@ argon2/20190702 libmysqlclient/8.1.0 libpq/15.5 ## mbedtls/3.2.1 # unable to upgrade until mbedTLS issue #7087 is fixed -## openssl/3.2.2 +## openssl/3.3.2 pcre/8.45 pcre2/10.44 -re2/20240301 -sqlite3/3.46.0 +re2/20240702 +sqlite3/3.47.0 [options] argon2:shared=True From ab87955de3a5ebfc3a47dcac8f3e467dd9482fc1 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 23 Dec 2024 15:32:07 +0000 Subject: [PATCH 4/4] Silence a compiler error on Alpine. --- .github/workflows/ci-alpine.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-alpine.yml b/.github/workflows/ci-alpine.yml index 70cfd5001..5132a0277 100644 --- a/.github/workflows/ci-alpine.yml +++ b/.github/workflows/ci-alpine.yml @@ -10,7 +10,7 @@ jobs: container: alpine:edge runs-on: ubuntu-latest env: - CXXFLAGS: -std=${{ matrix.standard }} -Wno-error=variadic-macros + CXXFLAGS: -std=${{ matrix.standard }} -Wno-error=non-virtual-dtor -Wno-error=variadic-macros TEST_BUILD_MODULES: argon2 geo_maxmind ldap mysql pgsql regex_pcre regex_pcre2 regex_posix regex_re2 regex_stdlib regex_tre sqlite3 ssl_gnutls ssl_mbedtls ssl_openssl sslrehashsignal steps: - uses: actions/checkout@v4