-
-
Notifications
You must be signed in to change notification settings - Fork 265
-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
NullPointerException in SmimeUtilFixed when protocol is missing (which is valid) #292
Labels
Milestone
Comments
If you want I can now provide an example mail that causes the error, I'd have to send it to you via mail though.
|
Yes please, that would be most helpful 👍 |
bbottema
changed the title
Possible NullPointer in SmimeUtilFixed
NullPointerException in SmimeUtilFixed when protocol is missing (which is valid)
Feb 16, 2021
Released in 6.5.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using the
outlookMsgToEmailBuilder
functionsimple-java-mail/modules/simple-java-mail/src/main/java/org/simplejavamail/converter/EmailConverter.java
Line 201 in cd197aa
I sometimes get this error message:
This is caused by a Nullpointer in this function when the
contentType
in the calling function does not contain the parameterprotocol
:simple-java-mail/modules/smime-module/src/main/java/org/simplejavamail/internal/smimesupport/SmimeUtilFixed.java
Lines 59 to 62 in cd197aa
simple-java-mail/modules/smime-module/src/main/java/org/simplejavamail/internal/smimesupport/SmimeUtilFixed.java
Lines 53 to 57 in cd197aa
I haven't been able to create an email with this problem myself (if necessary I can obtain one) but here is the way we handle these emails:
outlookMsgToEmailBuilder
with that InputStreamI don't know why these mails don't contain a protocol, but the easiest way to prevent the NullPointer would be to make the
isSmimeSignatureProtocoll
function nullsave by usingprotocol
as input parameter forequalsIgnoreCase
:This would change the NullPointer to a
false
.The text was updated successfully, but these errors were encountered: