-
-
Notifications
You must be signed in to change notification settings - Fork 25
Removed parse-email-address package (it moved to monorepo) #342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
closes https://linear.app/ghost/issue/NY-942/create-and-use-parse-email-address-package-in-core ref #25919 ref TryGhost/framework#342 This creates the `parse-email-address` package (previously reviewed [here][0]--all I did was move it over) and uses it in email normalization, used when sending magic links. This should not change behavior for "normal", lowercase ASCII email addresses. However, it does make several subtler tweaks to the way emails are normalized: - Some totally invalid emails weren't normalized. Before: if `req.body.email` wasn't a string or lacked an `@`, no normalization would occur. The system would then attempt to send an email that'd almost certainly fail. After: these throw a "bad request" error. - Invalid emails with multiple `@` signs were considered valid. Before: `foo@bar@example.com` was accepted. After: it is not accepted and throws a "bad request" error. - Long emails are now considered invalid. Before: the only limit on email length was that of the request body. After: the whole email is limited to 986 octets and the domain is limited to 253 octets (per SMTP). Domain labels are limited to 63 octets (per DNS). - Domains are now lowercased. Before: `FOO@Example.COM` was normalized to `FOO@Example.COM`. After: `FOO@Example.COM` is normalized to `FOO@example.com`. [0]: TryGhost/framework#340
b4505b3 to
2d5bcd9
Compare
closes https://linear.app/ghost/issue/NY-942/create-and-use-parse-email-address-package-in-core ref #25919 ref TryGhost/framework#342 This creates the `parse-email-address` package (previously reviewed [here][0]--all I did was move it over) and uses it in email normalization, used when sending magic links. This should not change behavior for "normal", lowercase ASCII email addresses. However, it does make several subtler tweaks to the way emails are normalized: - Some totally invalid emails weren't normalized. Before: if `req.body.email` wasn't a string or lacked an `@`, no normalization would occur. The system would then attempt to send an email that'd almost certainly fail. After: these throw a "bad request" error. - Invalid emails with multiple `@` signs were considered valid. Before: `foo@bar@example.com` was accepted. After: it is not accepted and throws a "bad request" error. - Long emails are now considered invalid. Before: the only limit on email length was that of the request body. After: the whole email is limited to 986 octets and the domain is limited to 253 octets (per SMTP). Domain labels are limited to 63 octets (per DNS). - Domains are now lowercased. Before: `FOO@Example.COM` was normalized to `FOO@Example.COM`. After: `FOO@Example.COM` is normalized to `FOO@example.com`. [0]: TryGhost/framework#340
closes https://linear.app/ghost/issue/NY-942/create-and-use-parse-email-address-package-in-core ref #25919 ref TryGhost/framework#342 This creates the `parse-email-address` package (previously reviewed [here][0]--all I did was move it over) and uses it in email normalization, used when sending magic links. This should not change behavior for "normal", lowercase ASCII email addresses. However, it does make several subtler tweaks to the way emails are normalized: - Some totally invalid emails weren't normalized. Before: if `req.body.email` wasn't a string or lacked an `@`, no normalization would occur. The system would then attempt to send an email that'd almost certainly fail. After: these throw a "bad request" error. - Invalid emails with multiple `@` signs were considered valid. Before: `foo@bar@example.com` was accepted. After: it is not accepted and throws a "bad request" error. - Long emails are now considered invalid. Before: the only limit on email length was that of the request body. After: the whole email is limited to 986 octets and the domain is limited to 253 octets (per SMTP). Domain labels are limited to 63 octets (per DNS). - Domains are now lowercased. Before: `FOO@Example.COM` was normalized to `FOO@Example.COM`. After: `FOO@Example.COM` is normalized to `FOO@example.com`. [0]: TryGhost/framework#340
ref a5384b4 ref TryGhost/Ghost#25920 `@tryghost/parse-email-address` has been moved to the main Ghost repo in <TryGhost/Ghost#25920>. This reverts commit a5384b4.
2d5bcd9 to
1e0f31e
Compare
closes https://linear.app/ghost/issue/NY-942/create-and-use-parse-email-address-package-in-core ref #25919 ref TryGhost/framework#342 This creates the `parse-email-address` package (previously reviewed [here][0]--all I did was move it over) and uses it in email normalization, used when sending magic links. This should not change behavior for "normal", lowercase ASCII email addresses. However, it does make several subtler tweaks to the way emails are normalized: - Some totally invalid emails weren't normalized. Before: if `req.body.email` wasn't a string or lacked an `@`, no normalization would occur. The system would then attempt to send an email that'd almost certainly fail. After: these throw a "bad request" error. - Invalid emails with multiple `@` signs were considered valid. Before: `foo@bar@example.com` was accepted. After: it is not accepted and throws a "bad request" error. - Long emails are now considered invalid. Before: the only limit on email length was that of the request body. After: the whole email is limited to 986 octets and the domain is limited to 253 octets (per SMTP). Domain labels are limited to 63 octets (per DNS). - Domains are now lowercased. Before: `FOO@Example.COM` was normalized to `FOO@Example.COM`. After: `FOO@Example.COM` is normalized to `FOO@example.com`. [0]: TryGhost/framework#340
ref a5384b4
ref TryGhost/Ghost#25920
@tryghost/parse-email-addresswill be moved to the main Ghost repo in TryGhost/Ghost#25920.This reverts commit a5384b4.