[smuxi: 11/12] Engine: fix serialization bug for CertFP support



commit 34886aef6630b28dc44064b3d300e89440c06554
Author: Mirco Bauer <meebey meebey net>
Date:   Fri Dec 28 17:58:45 2018 +0100

    Engine: fix serialization bug for CertFP support
    
    The CertFP support in 83a2ab1c3 adds optional serialization and deserialization
    of fields specific to the CertFP support. The _ClientCertificateFilename_ field
    in particular was added to the serialization stream if the field is null or
    empty.  Obviously it should only serialize it if the field is not null or empty.
    The bug was never noticed and reported because there is no GUI to provide the
    certificate file when doing an adhoc connection (instead of a saved one).

 src/Engine/Config/ServerModel.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Engine/Config/ServerModel.cs b/src/Engine/Config/ServerModel.cs
index c0576e1b..bbbeccf8 100644
--- a/src/Engine/Config/ServerModel.cs
+++ b/src/Engine/Config/ServerModel.cs
@@ -1,7 +1,7 @@
 /*
  * Smuxi - Smart MUltipleXed Irc
  *
- * Copyright (c) 2007, 2010, 2012-2014, 2017 Mirco Bauer <meebey meebey net>
+ * Copyright (c) 2007, 2010, 2012-2014, 2017-2018 Mirco Bauer <meebey meebey net>
  *
  * Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
  *
@@ -161,7 +161,7 @@ namespace Smuxi.Engine
             // HACK: skip ClientCertificateFilename if it has no value as it
             // breaks older ServerModel implementations that relied on automatic
             // serialization which was the case in < 0.8.11
-            if (String.IsNullOrEmpty(ClientCertificateFilename)) {
+            if (!String.IsNullOrEmpty(ClientCertificateFilename)) {
                 info.AddValue("ClientCertificateFilename", ClientCertificateFilename);
             }
             info.AddValue("_Protocol", Protocol);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]