diff options
| author | 2023-06-05 01:29:14 +0100 | |
|---|---|---|
| committer | 2023-06-05 11:13:25 +0100 | |
| commit | 2d029f348a76d70be05c2dbf598ec9d8ea3529e0 (patch) | |
| tree | d5972e1440d7462be34f9594ffb95b7a7e07155f /src | |
| parent | Fix commands overflowing the message size in `/STATS Oo`. (diff) | |
Try to cloak with the registerable suffix first with PSL cloaking.
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/m_cloak_sha256.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/m_cloak_sha256.cpp b/src/modules/m_cloak_sha256.cpp index a269048da..92e3ca964 100644 --- a/src/modules/m_cloak_sha256.cpp +++ b/src/modules/m_cloak_sha256.cpp @@ -148,7 +148,9 @@ private: if (psl && separator == '.') { // Attempt to look up the suffix with libpsl. - const char* publicsuffix = psl_unregistrable_domain(psl, host.c_str()); + const char* publicsuffix = psl_registrable_domain(psl, host.c_str()); + if (!publicsuffix || publicsuffix == host) + publicsuffix = psl_unregistrable_domain(psl, host.c_str()); if (publicsuffix && publicsuffix != host) visiblepart = publicsuffix; } |
