Skip to content
Snippets Groups Projects
Commit 05db9a49 authored by deuce's avatar deuce
Browse files

Fix domain parsing and default domain comparison in flo_outbound().

parent b1b8b10f
No related branches found
No related tags found
No related merge requests found
......@@ -129,7 +129,7 @@ var FIDO = {
var zone;
var domain;
m = addr.match(/^(?:([0-9]+):)?([0-9]+)\/([0-9]+)(?:\.([0-9]+))?(@.*)?$/);
m = addr.toString().match(/^(?:([0-9]+):)?([0-9]+)\/([0-9]+)(?:\.([0-9]+))?(?:@(.*))?$/);
if (m===null)
throw('invalid address '+addr);
zone = m[1];
......@@ -220,7 +220,7 @@ FIDO.Addr.prototype.flo_outbound = function(default_zone, default_domain)
// backslash() doesn't work on an empty string
var ret = '_';
if (this.zone !== undefined && (this.domain !== default_domain.toLowerCase() || this.zone !== default_zone))
if (this.zone !== undefined && (( default_domain !== undefined && this.domain !== default_domain.toLowerCase()) || this.zone !== default_zone))
ret += format(".%03x", this.zone);
ret = backslash(ret);
if (this.point !== undefined)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment