aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2015-11-17 17:04:04 +0000
committerMatthew Wild <mwild1@gmail.com>2015-11-17 17:04:04 +0000
commita799177379bbe294f1bb5fe1b8b800e2cee72738 (patch)
treea8a6eb36805c334217159df4d836d0303b5cd111
parentca7b1d853a52d85ea58ee3c66cf7e474c5c6e7c2 (diff)
parent5560527af809672a418746186b1d25b4babf68c1 (diff)
downloadprosody-a799177379bbe294f1bb5fe1b8b800e2cee72738.tar.gz
prosody-a799177379bbe294f1bb5fe1b8b800e2cee72738.zip
Merge 0.9->0.10
-rw-r--r--certs/openssl.cnf14
-rw-r--r--plugins/muc/muc.lib.lua2
2 files changed, 11 insertions, 5 deletions
diff --git a/certs/openssl.cnf b/certs/openssl.cnf
index 091409c4..ee17b1cf 100644
--- a/certs/openssl.cnf
+++ b/certs/openssl.cnf
@@ -13,8 +13,8 @@ SRVName = 1.3.6.1.5.5.7.8.7
default_bits = 4096
default_keyfile = example.com.key
distinguished_name = distinguished_name
-req_extensions = v3_extensions
-x509_extensions = v3_extensions
+req_extensions = certrequest
+x509_extensions = selfsigned
# ask about the DN?
prompt = no
@@ -28,16 +28,22 @@ organizationName = Your Organisation
organizationalUnitName = XMPP Department
emailAddress = xmpp@example.com
-[ v3_extensions ]
+[ certrequest ]
# for certificate requests (req_extensions)
-# and self-signed certificates (x509_extensions)
basicConstraints = CA:FALSE
keyUsage = digitalSignature,keyEncipherment
extendedKeyUsage = serverAuth,clientAuth
subjectAltName = @subject_alternative_name
+[ selfsigned ]
+
+# and self-signed certificates (x509_extensions)
+
+basicConstraints = CA:TRUE
+subjectAltName = @subject_alternative_name
+
[ subject_alternative_name ]
# See http://tools.ietf.org/html/rfc6120#section-13.7.1.2 for more info.
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index c32da338..48231c37 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -361,7 +361,7 @@ local function construct_stanza_id(room, stanza)
end
local function deconstruct_stanza_id(room, stanza)
local from_jid_possiblybare, to_nick = stanza.attr.from, stanza.attr.to;
- local from_jid, id, to_jid_hash = (base64.decode(stanza.attr.id) or ""):match("^(.+)%z(.*)%z(.+)$");
+ local from_jid, id, to_jid_hash = (base64.decode(stanza.attr.id) or ""):match("^(%Z+)%z(%Z*)%z(.+)$");
local from_nick = room._jid_nick[from_jid];
if not(from_nick) then return; end