diff options
author | Matthew Wild <mwild1@gmail.com> | 2016-03-26 19:55:08 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2016-03-26 19:55:08 +0000 |
commit | 71b31dde2564da080341c4b72500e3832afbfe60 (patch) | |
tree | f01e0009330155ac97e0f24c335b4c333f6cd0f1 | |
parent | c24be27b2f9a76001ff4c3de442606b05543ed7e (diff) | |
download | prosody-71b31dde2564da080341c4b72500e3832afbfe60.tar.gz prosody-71b31dde2564da080341c4b72500e3832afbfe60.zip |
certmanager: Explicitly tonumber() version number segments before doing arithmetic and avoid relying on implicit coercion (thanks David Favro)
-rw-r--r-- | core/certmanager.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua index a4c9d891..29a5a6c8 100644 --- a/core/certmanager.lua +++ b/core/certmanager.lua @@ -36,7 +36,7 @@ local resolve_path = require"util.paths".resolve_relative_path; local config_path = prosody.paths.config; local luasec_major, luasec_minor = ssl._VERSION:match("^(%d+)%.(%d+)"); -local luasec_version = luasec_major * 100 + luasec_minor; +local luasec_version = tonumber(luasec_major) * 100 + tonumber(luasec_minor); local luasec_has = { -- TODO If LuaSec ever starts exposing these things itself, use that instead cipher_server_preference = luasec_version >= 2; |