From af12c6557aeb18a41c6a9d917388eb467b12b373 Mon Sep 17 00:00:00 2001 From: deepend Date: Thu, 15 Jan 2026 09:15:38 -0700 Subject: [PATCH 1/8] Fix SNI extension handling --- src/common/server.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/src/common/server.c b/src/common/server.c index 6b14ef80..05fe584b 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -64,6 +64,40 @@ #ifdef USE_OPENSSL /* local variables */ static struct session *g_sess = NULL; + +static gboolean +ssl_sni_hostname_is_valid (const char *hostname) +{ + const unsigned char *current; + char *ip_literal = NULL; + size_t hostname_len; + + if (!hostname || !hostname[0]) + return FALSE; + + for (current = (const unsigned char *)hostname; *current; current++) + { + if (*current > 0x7f) + return FALSE; + } + + if (g_hostname_is_ip_address (hostname)) + return FALSE; + + hostname_len = strlen (hostname); + if (hostname[0] == '[' && hostname_len > 2 && hostname[hostname_len - 1] == ']') + { + ip_literal = g_strndup (hostname + 1, hostname_len - 2); + if (g_hostname_is_ip_address (ip_literal)) + { + g_free (ip_literal); + return FALSE; + } + g_free (ip_literal); + } + + return TRUE; +} #endif static GSList *away_list = NULL; @@ -519,7 +553,16 @@ ssl_do_connect (server * serv) g_sess = serv->server_session; /* Set SNI hostname before connect */ - SSL_set_tlsext_host_name(serv->ssl, serv->hostname); + if (ssl_sni_hostname_is_valid (serv->hostname)) + { + SSL_set_tlsext_host_name (serv->ssl, serv->hostname); + } + else + { + g_snprintf (buf, sizeof (buf), "* Skipping invalid SNI hostname: %s", + serv->hostname); + EMIT_SIGNAL (XP_TE_SSLMESSAGE, serv->server_session, buf, NULL, NULL, NULL, 0); + } if (SSL_connect (serv->ssl) <= 0) { From 78c4b474dbf2024e1ea0dd34a4c2e842a915a1ad Mon Sep 17 00:00:00 2001 From: deepend Date: Thu, 15 Jan 2026 09:48:31 -0700 Subject: [PATCH 2/8] update python to v3.14 --- win32/installer/zoitechat-arm64.iss | 2 +- win32/installer/zoitechat.iss.tt | 8 ++++---- win32/zoitechat.props | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/win32/installer/zoitechat-arm64.iss b/win32/installer/zoitechat-arm64.iss index a2c96bfd..3edfe978 100644 --- a/win32/installer/zoitechat-arm64.iss +++ b/win32/installer/zoitechat-arm64.iss @@ -88,7 +88,7 @@ Name: "langs\lua"; Description: "Lua"; Types: normal custom; Flags: disablenouni ; These are kept for consistency, but hidden on ARM64 unless you later ship ARM64 installers for them. Name: "langs\perl"; Description: "Perl (requires Perl 5.20)"; Types: custom; Flags: disablenouninstallwarning; Check: not IsArm64 -Name: "langs\python"; Description: "Python (requires Python 3.8)"; Types: custom; Flags: disablenouninstallwarning; Check: not IsArm64 +Name: "langs\python"; Description: "Python (requires Python 3.14.2)"; Types: custom; Flags: disablenouninstallwarning; Check: not IsArm64 [Tasks] Name: portable; Description: "Yes"; GroupDescription: "Portable Mode: Stores configuration files within install directory for portable drives."; Flags: unchecked diff --git a/win32/installer/zoitechat.iss.tt b/win32/installer/zoitechat.iss.tt index 39621428..03521b7e 100644 --- a/win32/installer/zoitechat.iss.tt +++ b/win32/installer/zoitechat.iss.tt @@ -75,7 +75,7 @@ Name: "plugins\winamp"; Description: "Winamp"; Types: custom; Flags: disablenoun Name: "langs"; Description: "Language Interfaces"; Types: custom; Flags: disablenouninstallwarning Name: "langs\lua"; Description: "Lua"; Types: normal custom; Flags: disablenouninstallwarning Name: "langs\perl"; Description: "Perl (requires Perl 5.20)"; Types: custom; Flags: disablenouninstallwarning -Name: "langs\python"; Description: "Python (requires Python 3.8)"; Types: custom; Flags: disablenouninstallwarning +Name: "langs\python"; Description: "Python (requires Python 3.14.2)"; Types: custom; Flags: disablenouninstallwarning [Tasks] Name: portable; Description: "Yes"; GroupDescription: "Portable Mode: Stores configuration files within install directory for portable drives."; Flags: unchecked @@ -298,12 +298,12 @@ begin REDIST := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/vcredist_2015_x64.exe'; REDIST_2013 := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/vcredist_2013_x64.exe'; PERL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/Perl.5.20.0.x64.msi'; - PY3 := 'https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe'; + PY3 := 'https://www.python.org/ftp/python/3.14.2/python-3.14.2-amd64.exe'; #else REDIST := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/vcredist_2015_x86.exe'; REDIST_2013 := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/vcredist_2013_x86.exe'; PERL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/Perl.5.20.0.x86.msi'; - PY3 := 'https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe'; + PY3 := 'https://www.python.org/ftp/python/3.14.2/python-3.14.2.exe'; #endif DOTNET := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/dotnet_40.exe'; SPELL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/ZoiteChat.Spelling.Dictionaries.r2.exe'; @@ -327,7 +327,7 @@ begin idpAddFile(PERL, ExpandConstant('{tmp}\perl.msi')) end; - if IsComponentSelected('langs\python\python3') and not CheckDLL('python38.dll') then + if IsComponentSelected('langs\python\python3') and not CheckDLL('python314.dll') then idpAddFile(PY3, ExpandConstant('{tmp}\python.exe')); end; end; diff --git a/win32/zoitechat.props b/win32/zoitechat.props index efa4cf10..3ae6f0b0 100644 --- a/win32/zoitechat.props +++ b/win32/zoitechat.props @@ -7,7 +7,7 @@ c:\gtk-build\gtk c:\gtk-build\gendef c:\gtk-build\perl-5.20 - c:\gtk-build\python-3.8 + c:\gtk-build\python-3.14 c:\gtk-build\WinSparkle @@ -22,7 +22,7 @@ $(YourPerlPath)\$(PlatformName) perl520 $(YourPython3Path)\$(PlatformName) - python38 + python314 hcpython3 $(DepsRoot)\include\luajit-2.1 hclua From 0bcf4bee6ebb25de6751c60e53f8a9af2f8dce07 Mon Sep 17 00:00:00 2001 From: deepend Date: Thu, 15 Jan 2026 10:02:24 -0700 Subject: [PATCH 3/8] Change to Python 3.14 --- .github/workflows/windows-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 04c71754..f93d42ba 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.14' architecture: ${{ matrix.arch }} - name: Install Dependencies From 1be65ff216ec2a9fcacc09cb8a9568be03a8cc63 Mon Sep 17 00:00:00 2001 From: deepend Date: Thu, 15 Jan 2026 10:15:48 -0700 Subject: [PATCH 4/8] Update Python to v3.14.2 --- .github/workflows/windows-build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index f93d42ba..f0672586 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: '3.14' + python-version: '3.14.2' architecture: ${{ matrix.arch }} - name: Install Dependencies @@ -52,17 +52,17 @@ jobs: Invoke-WebRequest https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.17.0/perl-5.20.0-${{ matrix.arch }}.7z -OutFile deps\perl-${{ matrix.arch }}.7z & 7z.exe x deps\perl-${{ matrix.arch }}.7z -oC:\gtk-build\perl-5.20\${{ matrix.platform }} - New-Item -Path "C:\gtk-build\python-3.8" -ItemType Directory -Force | Out-Null + New-Item -Path "C:\gtk-build\python-3.14.2" -ItemType Directory -Force | Out-Null $pyRoot = $env:pythonLocation if (-not $pyRoot) { $pyRoot = & python -c "import sys; print(sys.prefix)" } - $target = "C:\gtk-build\python-3.8\${{ matrix.platform }}" + $target = "C:\gtk-build\python-3.14.2\${{ matrix.platform }}" if (Test-Path $target) { Remove-Item $target -Recurse -Force } - New-Item -Path "C:\gtk-build\python-3.8" -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null + New-Item -Path "C:\gtk-build\python-3.14.2" -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null python -m pip install --upgrade pip python -m pip install cffi @@ -72,9 +72,9 @@ jobs: run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" - set "PYTHON_DIR=C:\gtk-build\python-3.8\${{ matrix.platform }}" - if not exist "%PYTHON_DIR%\libs\python38.lib" ( - echo Missing %PYTHON_DIR%\libs\python38.lib + set "PYTHON_DIR=C:\gtk-build\python-3.14.2\${{ matrix.platform }}" + if not exist "%PYTHON_DIR%\libs\python314.lib" ( + echo Missing %PYTHON_DIR%\libs\python314.lib dir "%PYTHON_DIR%\libs" exit /b 1 ) From e79564b50167f14fdd9390e7aa7ce08bb757998c Mon Sep 17 00:00:00 2001 From: deepend Date: Thu, 15 Jan 2026 10:47:36 -0700 Subject: [PATCH 5/8] Update to Python v3.14 --- .github/workflows/windows-build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index f0672586..accbf59d 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -53,6 +53,10 @@ jobs: & 7z.exe x deps\perl-${{ matrix.arch }}.7z -oC:\gtk-build\perl-5.20\${{ matrix.platform }} New-Item -Path "C:\gtk-build\python-3.14.2" -ItemType Directory -Force | Out-Null +<<<<<<< ours +======= + New-Item -Path "C:\gtk-build\python-3.14" -ItemType Directory -Force | Out-Null +>>>>>>> theirs $pyRoot = $env:pythonLocation if (-not $pyRoot) { @@ -62,7 +66,15 @@ jobs: $target = "C:\gtk-build\python-3.14.2\${{ matrix.platform }}" if (Test-Path $target) { Remove-Item $target -Recurse -Force } +<<<<<<< ours New-Item -Path "C:\gtk-build\python-3.14.2" -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null +======= + $aliasTarget = "C:\gtk-build\python-3.14\${{ matrix.platform }}" + if (Test-Path $aliasTarget) { Remove-Item $aliasTarget -Recurse -Force } + + New-Item -Path "C:\gtk-build\python-3.14.2" -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null + New-Item -Path "C:\gtk-build\python-3.14" -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null +>>>>>>> theirs python -m pip install --upgrade pip python -m pip install cffi From d54669982add56cd373efe0ac9587689ed748658 Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Thu, 15 Jan 2026 10:51:04 -0700 Subject: [PATCH 6/8] Refactor Python directory setup in Windows build workflow Updated Python directory creation logic and resolved version discrepancies. --- .github/workflows/windows-build.yml | 31 +++++++++-------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index accbf59d..63970658 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -52,34 +52,21 @@ jobs: Invoke-WebRequest https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.17.0/perl-5.20.0-${{ matrix.arch }}.7z -OutFile deps\perl-${{ matrix.arch }}.7z & 7z.exe x deps\perl-${{ matrix.arch }}.7z -oC:\gtk-build\perl-5.20\${{ matrix.platform }} - New-Item -Path "C:\gtk-build\python-3.14.2" -ItemType Directory -Force | Out-Null -<<<<<<< ours -======= - New-Item -Path "C:\gtk-build\python-3.14" -ItemType Directory -Force | Out-Null ->>>>>>> theirs - + # Resolve python root from setup-python $pyRoot = $env:pythonLocation - if (-not $pyRoot) { - $pyRoot = & python -c "import sys; print(sys.prefix)" + if (-not $pyRoot) { $pyRoot = & python -c "import sys; print(sys.prefix)" } + + # Create BOTH paths because the .vcxproj hard-codes python-3.14\... + foreach ($pyDir in @("C:\gtk-build\python-3.14.2", "C:\gtk-build\python-3.14")) { + New-Item -Path $pyDir -ItemType Directory -Force | Out-Null + $target = Join-Path $pyDir "${{ matrix.platform }}" + if (Test-Path $target) { Remove-Item $target -Recurse -Force } + New-Item -Path $pyDir -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null } - $target = "C:\gtk-build\python-3.14.2\${{ matrix.platform }}" - if (Test-Path $target) { Remove-Item $target -Recurse -Force } - -<<<<<<< ours - New-Item -Path "C:\gtk-build\python-3.14.2" -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null -======= - $aliasTarget = "C:\gtk-build\python-3.14\${{ matrix.platform }}" - if (Test-Path $aliasTarget) { Remove-Item $aliasTarget -Recurse -Force } - - New-Item -Path "C:\gtk-build\python-3.14.2" -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null - New-Item -Path "C:\gtk-build\python-3.14" -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null ->>>>>>> theirs - python -m pip install --upgrade pip python -m pip install cffi - - name: Build run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" From 7df9b08313cbd102365d74de25451fc6ab4c5588 Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Thu, 15 Jan 2026 11:12:56 -0700 Subject: [PATCH 7/8] Refactor newline handling in servlist.c Remove redundant newline character handling in fgets buffer. --- src/common/servlist.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/common/servlist.c b/src/common/servlist.c index dd06d52d..c2eb3e77 100644 --- a/src/common/servlist.c +++ b/src/common/servlist.c @@ -990,11 +990,10 @@ servlist_load (void) while (fgets (buf, sizeof (buf) - 2, fp)) { + g_strchomp (buf); len = strlen (buf); if (!len) continue; - buf[len] = 0; - buf[len-1] = 0; /* remove the trailing \n */ if (net) { switch (buf[0]) From 90b227ed59d69c1b91df413ffbd9bef9ccfdde68 Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Fri, 16 Jan 2026 13:32:38 -0700 Subject: [PATCH 8/8] Update documentation links in readme.md --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index d06d741b..f8b058b8 100644 --- a/readme.md +++ b/readme.md @@ -9,8 +9,8 @@ ZoiteChat is an HexChat based IRC client for Windows and UNIX-like operating systems. See [IRCHelp.org](http://irchelp.org) for information about IRC in general. -For more information on ZoiteChat please read our [documentation](https://zoitechat.zoite.net/docs/en/latest/index.html): -- [Downloads](http://zoitechat.zoite.net/downloads) +For more information on ZoiteChat please read our [documentation](https://zoitechat.zoite.net/docs/): +- [Downloads](https://zoitechat.zoite.net/download) ---