Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Commit d696b26

Browse files
committed
Actually deprecate a single "::"
Signed-off-by: Eli Skeggs <[email protected]>
1 parent 92c538e commit d696b26

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/isemail.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ var internals = {
7070
rfc5321TLDNumeric: 10,
7171
rfc5321QuotedString: 11,
7272
rfc5321AddressLiteral: 12,
73-
rfc5321IPv6Deprecated: 13,
7473

7574
// Address is valid for message, but must be modified for envelope
7675
cfwsComment: 17,
@@ -83,6 +82,7 @@ var internals = {
8382
deprecatedQP: 36,
8483
deprecatedComment: 37,
8584
deprecatedCTEXT: 38,
85+
deprecatedIPv6: 39,
8686
deprecatedCFWSNearAt: 49,
8787

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

test/isemail.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ var expectations = [
7878
['test@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888]', diag.rfc5321AddressLiteral],
7979
['test@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888:9999]', diag.rfc5322IPv6GroupCount],
8080
['test@[IPv6:1111:2222:3333:4444:5555:6666:7777:888G]', diag.rfc5322IPv6BadCharacter],
81-
['test@[IPv6:1111:2222:3333:4444:5555:6666::8888]', diag.rfc5321IPv6Deprecated],
81+
['test@[IPv6:1111:2222:3333:4444:5555:6666::8888]', diag.deprecatedIPv6],
8282
['test@[IPv6:1111:2222:3333:4444:5555::8888]', diag.rfc5321AddressLiteral],
8383
['test@[IPv6:1111:2222:3333:4444:5555:6666::7777:8888]', diag.rfc5322IPv6MaxGroups],
8484
['test@[IPv6::3333:4444:5555:6666:7777:8888]', diag.rfc5322IPv6ColonStart],

0 commit comments

Comments
 (0)