# HG changeset patch # User Kim Alvefur # Date 1422617113 -3600 # Node ID c5ca63ac0e1b9550de8c7e0894186fc11abaa5ac # Parent 1e90054c3ac5d3a243a17068cd40d119ab542890 mod_tls_policy: Fix pattern matching diff -r 1e90054c3ac5 -r c5ca63ac0e1b mod_tls_policy/mod_tls_policy.lua --- a/mod_tls_policy/mod_tls_policy.lua Fri Jan 30 12:12:06 2015 +0100 +++ b/mod_tls_policy/mod_tls_policy.lua Fri Jan 30 12:25:13 2015 +0100 @@ -15,7 +15,7 @@ local info = origin.conn:socket():info(); for key, what in pairs(policy) do module:log("debug", "Does info[%q] = %s match %s ?", key, tostring(info[key]), tostring(what)); - if (type(what) == "number" and what < info[key] ) or (type(what) == "string" and not what:match(info[key])) then + if (type(what) == "number" and what < info[key] ) or (type(what) == "string" and not info[key]:match(what)) then origin:close({ condition = "policy-violation", text = "Cipher not acceptable" }); return false; end