Software /
code /
prosody
Changeset
4411:cf4e49b250c7
Merge with Zash
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 02 Nov 2011 07:17:26 +0000 |
parents | 4410:2928a74357c8 (current diff) 4409:c8f7ae9381cd (diff) |
children | 4412:5d7d9a60bc7f |
files | |
diffstat | 3 files changed, 16 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/core/certmanager.lua Sun Oct 23 20:56:33 2011 +0200 +++ b/core/certmanager.lua Wed Nov 02 07:17:26 2011 +0000 @@ -75,9 +75,9 @@ else reason = "Reason: "..tostring(reason):lower(); end - log("error", "SSL/TLS: Failed to load %s: %s", file, reason); + log("error", "SSL/TLS: Failed to load %s: %s (host: %s)", file, reason, host); else - log("error", "SSL/TLS: Error initialising for host %s: %s", host, err ); + log("error", "SSL/TLS: Error initialising for host %s: %s (host: %s)", host, err, host); end end return ctx, err;
--- a/prosody Sun Oct 23 20:56:33 2011 +0200 +++ b/prosody Wed Nov 02 07:17:26 2011 +0000 @@ -203,7 +203,7 @@ -- path1;path2;path3;defaultpath... CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); end - prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR, + prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR or ".", plugins = CFG_PLUGINDIR or "plugins", data = data_path }; prosody.arg = _G.arg;
--- a/util/jid.lua Sun Oct 23 20:56:33 2011 +0200 +++ b/util/jid.lua Wed Nov 02 07:17:26 2011 +0000 @@ -13,6 +13,16 @@ local nameprep = require "util.encodings".stringprep.nameprep; local resourceprep = require "util.encodings".stringprep.resourceprep; +local escapes = { + [" "] = "\\20"; ['"'] = "\\22"; + ["&"] = "\\26"; ["'"] = "\\27"; + ["/"] = "\\2f"; [":"] = "\\3a"; + ["<"] = "\\3c"; [">"] = "\\3e"; + ["@"] = "\\40"; ["\\"] = "\\5c"; +}; +local unescapes = {}; +for k,v in pairs(escapes) do unescapes[v] = k; end + module "jid" local function _split(jid) @@ -91,4 +101,7 @@ return false end +function escape(s) return s and (s:gsub(".", escapes)); end +function unescape(s) return s and (s:gsub("\\%x%x", unescapes)); end + return _M;