~ubuntu-branches/ubuntu/trusty/smuxi/trusty

« back to all changes in this revision

Viewing changes to src/Engine-JabbR/JabbrProtocolManager.cs

  • Committer: Package Import Robot
  • Author(s): Mirco Bauer, 2900227
  • Date: 2014-03-16 17:05:21 UTC
  • mfrom: (35.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140316170521-x2vtcgek0fmu3m7g
Tags: 0.11~rc5-1
[2900227] Imported Upstream version 0.11~rc5

Show diffs side-by-side

added added

removed removed

Lines of Context:
244
244
                    ToMessage();
245
245
            Session.AddMessageToChat(ProtocolChat, msg);
246
246
 
 
247
            if (!Server.ValidateServerCertificate) {
 
248
                var whitelist = Session.CertificateValidator.HostnameWhitelist;
 
249
                lock (whitelist) {
 
250
                    var hostname = Server.Hostname;
 
251
                    if (hostname.StartsWith("http://") ||
 
252
                        hostname.StartsWith("https://")) {
 
253
                        hostname = new Uri(hostname).Host;
 
254
                    }
 
255
                    if (!whitelist.Contains(hostname)) {
 
256
                        whitelist.Add(hostname);
 
257
                    }
 
258
                }
 
259
            }
 
260
 
247
261
            var res = Client.Connect(Server.Username, Server.Password);
248
262
            res.Wait();
249
263
            // HACK: this event can only be subscribed if we have made an