From 64f386e29e27cceecef7c4691c2b84d3e26c0813 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 23 Apr 2026 13:44:45 +0100 Subject: [PATCH] Skip deserialising the old cert column when its empty. --- modules/nickserv/ns_cert.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/nickserv/ns_cert.cpp b/modules/nickserv/ns_cert.cpp index c073287b9..1dfbfb9c1 100644 --- a/modules/nickserv/ns_cert.cpp +++ b/modules/nickserv/ns_cert.cpp @@ -207,6 +207,10 @@ public: if (s->GetSerializableType()->GetName() != NICKCORE_TYPE) return; + const auto certstr = data.Load("cert"); + if (certstr.empty()) + return; // Nothing to do. + auto *nc = anope_dynamic_static_cast(e); auto *cl = this->Require(nc); @@ -219,7 +223,7 @@ public: cl->certs.clear(); // Add the new cert list - spacesepstream sep(data.Load("cert")); + spacesepstream sep(certstr); for (Anope::string buf; sep.GetToken(buf); ) { auto *cert = new NSCertInfo(e);