Skip to content

Commit

Permalink
Actually deprecate a single "::"
Browse files Browse the repository at this point in the history
Signed-off-by: Eli Skeggs <skeggse@gmail.com>
  • Loading branch information
skeggse committed Sep 13, 2015
1 parent 92c538e commit d696b26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/isemail.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ var internals = {
rfc5321TLDNumeric: 10,
rfc5321QuotedString: 11,
rfc5321AddressLiteral: 12,
rfc5321IPv6Deprecated: 13,

// Address is valid for message, but must be modified for envelope
cfwsComment: 17,
Expand All @@ -83,6 +82,7 @@ var internals = {
deprecatedQP: 36,
deprecatedComment: 37,
deprecatedCTEXT: 38,
deprecatedIPv6: 39,
deprecatedCFWSNearAt: 49,

// Address is only valid according to broad definition in RFC 5322, but is otherwise invalid
Expand Down Expand Up @@ -780,7 +780,7 @@ var isEmail = function isEmail (email, options, callback) {
}
else if (groups.length === maxGroups) {
// Eliding a single "::"
updateResult(internals.diagnoses.rfc5321IPv6Deprecated);
updateResult(internals.diagnoses.deprecatedIPv6);
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/isemail.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var expectations = [
['test@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888]', diag.rfc5321AddressLiteral],
['test@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888:9999]', diag.rfc5322IPv6GroupCount],
['test@[IPv6:1111:2222:3333:4444:5555:6666:7777:888G]', diag.rfc5322IPv6BadCharacter],
['test@[IPv6:1111:2222:3333:4444:5555:6666::8888]', diag.rfc5321IPv6Deprecated],
['test@[IPv6:1111:2222:3333:4444:5555:6666::8888]', diag.deprecatedIPv6],
['test@[IPv6:1111:2222:3333:4444:5555::8888]', diag.rfc5321AddressLiteral],
['test@[IPv6:1111:2222:3333:4444:5555:6666::7777:8888]', diag.rfc5322IPv6MaxGroups],
['test@[IPv6::3333:4444:5555:6666:7777:8888]', diag.rfc5322IPv6ColonStart],
Expand Down

0 comments on commit d696b26

Please sign in to comment.