You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/01/25 07:55:23 UTC
[GitHub] [james-project] chibenwa opened a new pull request #860: JAMES-3708 Invalid mail address: Demonstrate NPE in RemoteDelivery
chibenwa opened a new pull request #860:
URL: https://github.com/apache/james-project/pull/860
I will likely work on solving this by providing stricter parsing in the `MailAddress` POJO...
Maybe @jeantil @mbaechler feedback would be useful to me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
[GitHub] [james-project] jeantil commented on a change in pull request #860: JAMES-3708 Invalid mail address: Demonstrate NPE in RemoteDelivery
Posted by GitBox <gi...@apache.org>.
jeantil commented on a change in pull request #860:
URL: https://github.com/apache/james-project/pull/860#discussion_r793450251
##########
File path: core/src/test/java/org/apache/james/core/MailAddressTest.java
##########
@@ -47,6 +48,7 @@
GOOD_ADDRESS,
GOOD_QUOTED_LOCAL_PART,
"server-dev@james-apache.org",
+ "a..b@domain.com",
Review comment:
hmm I don't know according to wikipedia that's not a valid address because the dot occurs twice in a row which seems to match [RFC5322](https://datatracker.ietf.org/doc/html/rfc5322#section-3.2.3) this would need to be quoted to be a valid local part since it is not a dot-atom
For reference examples from wikipedia :
good addresses:
- Abc@example.com
- Abc@10.42.0.1
- Abc.123@example.com
- user+mailbox/department=shipping@example.com
- !#$%&'*+-/=?^_`.{|}~@example.com
- "Abc@def"@example.com
- "Fred Bloggs"@example.com
- "Joe.\\Blow"@example.com
- Loïc.Accentué@voilà.fr8
- pelé@exemple.com
- δοκιμή@παράδειγμα.δοκιμή
- 我買@屋企.香港
- 二ノ宮@黒川.日本
- медведь@с-балалайкой.рф
- संपर्क@डाटामेल.भारत
bad addresses
- Abc.example.com
- Abc.@example.com
- Abc..123@example.com
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
[GitHub] [james-project] chibenwa commented on pull request #860: JAMES-3708 Invalid mail address: Demonstrate NPE in RemoteDelivery
Posted by GitBox <gi...@apache.org>.
chibenwa commented on pull request #860:
URL: https://github.com/apache/james-project/pull/860#issuecomment-1025145467
This is more or less what I have in mind on this topic.
As I changed some rules and as I changed some exception messages I am expecting a bunch of CI failures hence I will keep it as a draft for the time being, until I have a :green_apple: build.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
[GitHub] [james-project] chibenwa commented on pull request #860: JAMES-3708 Invalid mail address: Demonstrate NPE in RemoteDelivery
Posted by GitBox <gi...@apache.org>.
chibenwa commented on pull request #860:
URL: https://github.com/apache/james-project/pull/860#issuecomment-1023259342
>I am not familiar enough with the parsing parts of james but I feel that this should be rejected early when parsing the SMTP message...
Actually it is not even the SMTP message - James cares little about it and if we do - eg in JMAP we are lenient
We are speaking here of SMTP enveloppe which is even worse akka `RCPT TO: <a....@domain.tld>`.
I'm converting the PR as a draft to denote I plan further work on this and that indeed I do not wich to include a bad address in the list of good addresses...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
[GitHub] [james-project] jeantil commented on pull request #860: JAMES-3708 Invalid mail address: Demonstrate NPE in RemoteDelivery
Posted by GitBox <gi...@apache.org>.
jeantil commented on pull request #860:
URL: https://github.com/apache/james-project/pull/860#issuecomment-1023053747
Apart from the fact that the PR seems to introduce an invalid address in the "goodAddresses" list (but maybe that's on purpose to demonstrate the issue ?), I agree that ignoring exceptions by replacing a value by null is not a good idea :) especially if it triggers errors/DOS/... downstream.
I am not familiar enough with the parsing parts of james but I feel that this should be rejected early when parsing the SMTP message...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
[GitHub] [james-project] chibenwa commented on pull request #860: JAMES-3708 Invalid mail address: Demonstrate NPE in RemoteDelivery
Posted by GitBox <gi...@apache.org>.
chibenwa commented on pull request #860:
URL: https://github.com/apache/james-project/pull/860#issuecomment-1029009311
UN-WIP as this is :green_apple:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
[GitHub] [james-project] chibenwa merged pull request #860: JAMES-3708 Invalid mail address: Demonstrate NPE in RemoteDelivery
Posted by GitBox <gi...@apache.org>.
chibenwa merged pull request #860:
URL: https://github.com/apache/james-project/pull/860
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
[GitHub] [james-project] chibenwa commented on a change in pull request #860: JAMES-3708 Invalid mail address: Demonstrate NPE in RemoteDelivery
Posted by GitBox <gi...@apache.org>.
chibenwa commented on a change in pull request #860:
URL: https://github.com/apache/james-project/pull/860#discussion_r793649199
##########
File path: core/src/test/java/org/apache/james/core/MailAddressTest.java
##########
@@ -47,6 +48,7 @@
GOOD_ADDRESS,
GOOD_QUOTED_LOCAL_PART,
"server-dev@james-apache.org",
+ "a..b@domain.com",
Review comment:
Yes I know. Sorry it is indeed misleading.
> (but maybe that's on purpose to demonstrate the issue ?)
Yes it is, as my fix suggests to move it to bad address/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org