diff options
author | LemonBoy <thatlemon@gmail.com> | 2015-10-03 19:56:43 +0200 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2015-10-03 19:56:43 +0200 |
commit | 4a1eae8ed92c4bb2190c23f283954135cf7ec31c (patch) | |
tree | 0b5c88eb5755db23b401c913eb163092a874963e | |
parent | a87daceaec4bd6168415a2909d274cbeb13d6b78 (diff) | |
download | midori-4a1eae8ed92c4bb2190c23f283954135cf7ec31c.tar.gz |
Fix compilation and logic.
-rw-r--r-- | katze/midori-hsts.vala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/katze/midori-hsts.vala b/katze/midori-hsts.vala index 20d97b43..0ad72a38 100644 --- a/katze/midori-hsts.vala +++ b/katze/midori-hsts.vala @@ -85,7 +85,7 @@ namespace Midori { var expire = parts[1]._strip (); var allow_subdomains = bool.parse (parts[2]._strip ()); - var directive = new Directive (expire, allow_subdomains)); + var directive = new Directive (expire, allow_subdomains); if (directive.is_valid () && !directive.is_expired ()) { if (debug) stdout.printf ("HSTS: loading rule for %s\n", host); @@ -116,6 +116,8 @@ namespace Midori { if (hostname_is_ip_address (host)) return false; + stdout.printf ("kek %s\n", host); + // try an exact match first directive = whitelist.lookup (host); @@ -136,7 +138,7 @@ namespace Midori { } return directive != null && - directive.is_expired () && + !directive.is_expired () && (is_subdomain? directive.sub_domains: true); } |