[Pkg-javascript-commits] [ltx] 87/469: router: fix nameprepping

Jonas Smedegaard dr at jones.dk
Wed Aug 31 13:01:06 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository ltx.

commit b4247d516232125f3e46755db51a10a557b2bf1b
Author: Astro <astro at spaceboyz.net>
Date:   Mon Sep 6 02:11:12 2010 +0200

    router: fix nameprepping
---
 lib/xmpp/router.js | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/xmpp/router.js b/lib/xmpp/router.js
index dbb00af..d733d25 100644
--- a/lib/xmpp/router.js
+++ b/lib/xmpp/router.js
@@ -243,15 +243,15 @@ Router.prototype.acceptConnection = function(inStream) {
 
     // incoming server wants to verify an outgoing connection of ours
     inStream.addListener('dialbackVerify', function(from, to, id, key) {
-	from = nameprep(from);
-	to = nameprep(to);
+	from = nameprep.prepare(from);
+	to = nameprep.prepare(to);
 	var isValid = self.verifyDialback(from, to, id, key);
 	inStream.send(Server.dialbackVerified(to, from, id, isValid));
     });
     // incoming connection wants to get verified
     inStream.addListener('dialbackKey', function(from, to, key) {
-	from = nameprep(from);
-	to = nameprep(to);
+	from = nameprep.prepare(from);
+	to = nameprep.prepare(to);
 	var destDomain = to;
 	if (self.hasContext(to)) {
 	    var ctx = self.getContext(to);
@@ -262,8 +262,8 @@ Router.prototype.acceptConnection = function(inStream) {
 	    // these are needed before for removeListener()
 	    var onVerified, onClose;
 	    onVerified = function(from, to, id, isValid) {
-		from = nameprep(from);
-		to = nameprep(to);
+		from = nameprep.prepare(from);
+		to = nameprep.prepare(to);
 		if (to !== destDomain ||
 		    id != inStream.streamId)  // not for us
 		    return;
@@ -305,7 +305,7 @@ Router.prototype.setupStream = function(stream) {
  * Create domain context & register a stanza listener callback
  */
 Router.prototype.register = function(domain, listener) {
-    domain = nameprep(domain);
+    domain = nameprep.prepare(domain);
     this.getContext(domain).stanzaListener = listener;
 };
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/ltx.git



More information about the Pkg-javascript-commits mailing list