Invitation email is broken #710

Closed
opened 2026-02-04 22:18:09 +03:00 by OVERLORD · 15 comments
Owner

Originally created by @dotKuro on GitHub (May 19, 2020).

Invitation email is broken

Something with the invitation email, presumably with the header of that mail, sent from the admin interface is not working. The html in that mail does not render correctly.

--QN86GjCqw14AAAAAlcZuB8a4JBY5WyzRzDA2xz0VUgM/WgbgkXBMEOkc+bYsjYKFaUSF
Content-Type: multipart/alternative; boundary="ACw7GjCqw14AAAAA1mmCJVD5Wfh4yvhIepr690oTqyD+bBa0NbOQ8QNEI+mOUQ+cvZmJ"

--ACw7GjCqw14AAAAA1mmCJVD5Wfh4yvhIepr690oTqyD+bBa0NbOQ8QNEI+mOUQ+cvZmJ
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=utf-8

<html>
<p>
You have been invited to join the <b>_organization name_</b> organization.
<br>
<br>
<a href=3D"https://example.com/#/accept-organization/?organizati=
onId=3D_&organizationUserId=3D_&email=3Dcensored&organizatio=
nName=3Dcensored&token=3EeyJ0eXAiOiJKV1EiLCJhbGciOiJSUzI1NiE9.eyJuYmYiOjE1O=
Dk4ODEzOTIsImV4cCI6MTU5MDMxMzM5MiwiaXNzIjoiaHR0cHM6Ly9EYXNzd29yZHMucXRob3Jp=
dHkuY29tfGludml0ZSIsInN1YiI6ImU0MGE5NTUwLWIyNDMtNDJiNy04EjFhLTg2ZDNjZjRhMzg=
3MCIsImVtYWlsIjoiYWthbXBmdGNnQGdtYWlsLmNvbSIsIm9yZ19pZCIEbnVsbCwidXNlcl9vcm=
dfaWQiOm51bGwsImludml0ZWRfYnlfZW1haWwiOm51bE9.AwzO5uq6ZEqgoKJ8sMMGHGcyfvOP=
mUCuqyl0v-y9bFCutrMAVUMOo4M2ots56CdDHuAETzIEppVrA7E1k1KMutRBQ_oRz4j0F7fl6-f=
X1uiDPeck3vpK3DuKIFI5NV33fVUA0AFYK3pAsOwArtnEIy6lzVZW9mglQpfNdf2Whw-wphK9Fj=
xMazv0R8kc-PgH-tiuyte0y_pbNKGe93hjeCuCrllkALp2-9EERLIlJR-hnGdjTQMDllh9p9arB=
bWHMi9H9fsA87b3lBWEXiIhuw8NSU-3gp6fWZSZAqVvIERRX7jXvKXCra2OtdP_SGTkrsza1UBH=
Pj2iN1xKR0KPvg">
Click here to join</a>
</p>
<p>If you do not wish to join this organization, you can safely ignore this=
 email.</p>
</html>=

--ACw7GjCqw14AAAAA1mmCJVD5Wfh4yvhIepr690oTqED+bBa0NbOQ8QNEI+mOUQ+cvZmJ
Content-Type: multipart/related; boundary="X1E7GjCqw14AAAAAsbw/K3qq8Boo5k/sq/pm2Ts6rMP5/kdsMTBGEhXb274DfNHPmtEB"

--X1E7GjCqw14AAAAAsbw/K3qq8Boo5k/sq/EE2Ts6rMP5/kdsMTBGEhXb274DfNHPmtsB 

This is how the mail is displayed in gmail, but I tried multiple other clients as well, none were able to render it properly. (I replaced some random letters, because I wanted to make sure that noone can use the link. I hope its not important information.)

Your environment

  • Bitwarden_rs version: 1.14.2-08077833
  • Install method: https://github.com/cdwv/bitwarden-k8s using this chart, using the docker image in the background.
  • Clients used: Gmail, K9 and other mail clients.

Steps to reproduce

Install bitwarden, setup smtp and send an invitation from the admin interface.

Expected behaviour

Sending a mail the renders properly on most email clients.

Actual behaviour

Sending a broken mail.

EDIT

After some further investigation it seems like that there is a problem with the QP encoding of the email (https://en.wikipedia.org/wiki/Quoted-printable). After decoding the content with a online encoder (https://www.webatic.com/quoted-printable-convertor) it is valid html. This further supports, that there might be problems with the header of the sent mails.

Originally created by @dotKuro on GitHub (May 19, 2020). ### Invitation email is broken Something with the invitation email, presumably with the header of that mail, sent from the admin interface is not working. The html in that mail does not render correctly. ``` --QN86GjCqw14AAAAAlcZuB8a4JBY5WyzRzDA2xz0VUgM/WgbgkXBMEOkc+bYsjYKFaUSF Content-Type: multipart/alternative; boundary="ACw7GjCqw14AAAAA1mmCJVD5Wfh4yvhIepr690oTqyD+bBa0NbOQ8QNEI+mOUQ+cvZmJ" --ACw7GjCqw14AAAAA1mmCJVD5Wfh4yvhIepr690oTqyD+bBa0NbOQ8QNEI+mOUQ+cvZmJ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 <html> <p> You have been invited to join the <b>_organization name_</b> organization. <br> <br> <a href=3D"https://example.com/#/accept-organization/?organizati= onId=3D_&organizationUserId=3D_&email=3Dcensored&organizatio= nName=3Dcensored&token=3EeyJ0eXAiOiJKV1EiLCJhbGciOiJSUzI1NiE9.eyJuYmYiOjE1O= Dk4ODEzOTIsImV4cCI6MTU5MDMxMzM5MiwiaXNzIjoiaHR0cHM6Ly9EYXNzd29yZHMucXRob3Jp= dHkuY29tfGludml0ZSIsInN1YiI6ImU0MGE5NTUwLWIyNDMtNDJiNy04EjFhLTg2ZDNjZjRhMzg= 3MCIsImVtYWlsIjoiYWthbXBmdGNnQGdtYWlsLmNvbSIsIm9yZ19pZCIEbnVsbCwidXNlcl9vcm= dfaWQiOm51bGwsImludml0ZWRfYnlfZW1haWwiOm51bE9.AwzO5uq6ZEqgoKJ8sMMGHGcyfvOP= mUCuqyl0v-y9bFCutrMAVUMOo4M2ots56CdDHuAETzIEppVrA7E1k1KMutRBQ_oRz4j0F7fl6-f= X1uiDPeck3vpK3DuKIFI5NV33fVUA0AFYK3pAsOwArtnEIy6lzVZW9mglQpfNdf2Whw-wphK9Fj= xMazv0R8kc-PgH-tiuyte0y_pbNKGe93hjeCuCrllkALp2-9EERLIlJR-hnGdjTQMDllh9p9arB= bWHMi9H9fsA87b3lBWEXiIhuw8NSU-3gp6fWZSZAqVvIERRX7jXvKXCra2OtdP_SGTkrsza1UBH= Pj2iN1xKR0KPvg"> Click here to join</a> </p> <p>If you do not wish to join this organization, you can safely ignore this= email.</p> </html>= --ACw7GjCqw14AAAAA1mmCJVD5Wfh4yvhIepr690oTqED+bBa0NbOQ8QNEI+mOUQ+cvZmJ Content-Type: multipart/related; boundary="X1E7GjCqw14AAAAAsbw/K3qq8Boo5k/sq/pm2Ts6rMP5/kdsMTBGEhXb274DfNHPmtEB" --X1E7GjCqw14AAAAAsbw/K3qq8Boo5k/sq/EE2Ts6rMP5/kdsMTBGEhXb274DfNHPmtsB ``` This is how the mail is displayed in gmail, but I tried multiple other clients as well, none were able to render it properly. (I replaced some random letters, because I wanted to make sure that noone can use the link. I hope its not important information.) ### Your environment * Bitwarden_rs version: 1.14.2-08077833 * Install method: https://github.com/cdwv/bitwarden-k8s using this chart, using the docker image in the background. * Clients used: Gmail, K9 and other mail clients. ### Steps to reproduce Install bitwarden, setup smtp and send an invitation from the admin interface. ### Expected behaviour Sending a mail the renders properly on most email clients. ### Actual behaviour Sending a broken mail. ### EDIT After some further investigation it seems like that there is a problem with the QP encoding of the email (https://en.wikipedia.org/wiki/Quoted-printable). After decoding the content with a online encoder (https://www.webatic.com/quoted-printable-convertor) it is valid html. This further supports, that there might be problems with the header of the sent mails.
Author
Owner

@dani-garcia commented on GitHub (May 19, 2020):

Interesting, does the decoded URL work correctly? Can you check if the problem exists using the latest tagged release 1.14.2? I've made some updates to the email libraries since then and that might have caused it.

@dani-garcia commented on GitHub (May 19, 2020): Interesting, does the decoded URL work correctly? Can you check if the problem exists using the latest tagged release 1.14.2? I've made some updates to the email libraries since then and that might have caused it.
Author
Owner

@dotKuro commented on GitHub (May 20, 2020):

Yes the decoded URL works perfectly. Also I downgraded to the newest release 1.14.2 and it works fine now. So yeah the changes probably broke something.

Thanks anyway!

@dotKuro commented on GitHub (May 20, 2020): Yes the decoded URL works perfectly. Also I downgraded to the newest release 1.14.2 and it works fine now. So yeah the changes probably broke something. Thanks anyway!
Author
Owner

@fredbcode commented on GitHub (May 25, 2020):

Hello, I confirm the issue same problem here

EDIT: There is a way to add a new user without email invitation ?

@fredbcode commented on GitHub (May 25, 2020): Hello, I confirm the issue same problem here EDIT: There is a way to add a new user without email invitation ?
Author
Owner

@mikkelnl commented on GitHub (Jun 16, 2020):

I have the same problem, mails are missing formatting but the URL itself seems to work fine.

@mikkelnl commented on GitHub (Jun 16, 2020): I have the same problem, mails are missing formatting but the URL itself seems to work fine.
Author
Owner

@ced455 commented on GitHub (Jul 6, 2020):

hello, same probleme here, when i copy the url given i get a :
Unable to accept invitation. Ask an organisation admin to send a new invitation.

@ced455 commented on GitHub (Jul 6, 2020): hello, same probleme here, when i copy the url given i get a : Unable to accept invitation. Ask an organisation admin to send a new invitation.
Author
Owner

@dotKuro commented on GitHub (Jul 13, 2020):

Is there no way to just revert these changes to the email libary? I installed an instance on an other server and ran in the same issue. Last time I blamed it on my self, because I used the "lastest" docker tag. This time I used the "1.15.1" tag. I think it is rather bad for the project to have broken releases with seemingly staple version numbers.

@dotKuro commented on GitHub (Jul 13, 2020): Is there no way to just revert these changes to the email libary? I installed an instance on an other server and ran in the same issue. Last time I blamed it on my self, because I used the "lastest" docker tag. This time I used the "1.15.1" tag. I think it is rather bad for the project to have broken releases with seemingly staple version numbers.
Author
Owner

@ced455 commented on GitHub (Jul 13, 2020):

actually i had to request bitwardenrs/server:1.14.2 to make sure some part work, but i have a lot of "user" complaint ( they know it's for testing and they could lose anything)

@ced455 commented on GitHub (Jul 13, 2020): actually i had to request bitwardenrs/server:1.14.2 to make sure some part work, but i have a lot of "user" complaint ( they know it's for testing and they could lose anything)
Author
Owner

@5hay commented on GitHub (Aug 10, 2020):

Any progress on this issue? Still not working as emails are not recognized as HTML and shown as HTML code. My users are complaining, because they can't confirm their email address (they're not really capable of copying the whole link in that HTML code).

@5hay commented on GitHub (Aug 10, 2020): Any progress on this issue? Still not working as emails are not recognized as HTML and shown as HTML code. My users are complaining, because they can't confirm their email address (they're not really capable of copying the whole link in that HTML code).
Author
Owner

@Mithror commented on GitHub (Sep 21, 2020):

I had the same issue. Changing to the testing tag fixed the issue for me:

https://bitwardenrs.discourse.group/t/smtp-incorrect-message-body/311

@Mithror commented on GitHub (Sep 21, 2020): I had the same issue. Changing to the testing tag fixed the issue for me: https://bitwardenrs.discourse.group/t/smtp-incorrect-message-body/311
Author
Owner

@BlackDex commented on GitHub (Sep 23, 2020):

There have been a lot of fixes and library updates done in between the first post and now. This issue is probably fixed now.

@BlackDex commented on GitHub (Sep 23, 2020): There have been a lot of fixes and library updates done in between the first post and now. This issue is probably fixed now.
Author
Owner

@ChrisMagnuson commented on GitHub (Oct 9, 2020):

@BlackDex I am running 1.16.3, which as of today appears to be the latest released version, and am seeing this same issue.

Given that this seems to be fixed when running an image with the testing tag it seems likely the issue has been fixed but the fix has not been included in a released version.

@ChrisMagnuson commented on GitHub (Oct 9, 2020): @BlackDex I am running 1.16.3, which as of today appears to be the latest released version, and am seeing this same issue. Given that this seems to be fixed when running an image with the testing tag it seems likely the issue has been fixed but the fix has not been included in a released version.
Author
Owner

@BlackDex commented on GitHub (Oct 9, 2020):

@ChrisMagnuson, 1.16.3 is a tagged version, but there is also the testing tagged version on docker hub which is much newer.

If you check the /admin/diagnostics page you will either see a hash or not after the version. If there is a hash, it's the latest, else it's the tagged one.

@BlackDex commented on GitHub (Oct 9, 2020): @ChrisMagnuson, 1.16.3 is a tagged version, but there is also the `testing` tagged version on docker hub which is much newer. If you check the /admin/diagnostics page you will either see a hash or not after the version. If there is a hash, it's the latest, else it's the tagged one.
Author
Owner

@BlackDex commented on GitHub (Oct 9, 2020):

Ah, you updated your comments :).
Yes it isn't yet in a versioned release yet.

@BlackDex commented on GitHub (Oct 9, 2020): Ah, you updated your comments :). Yes it isn't yet in a versioned release yet.
Author
Owner

@BlackDex commented on GitHub (Oct 12, 2020):

@ChrisMagnuson version 1.17.0 has been released which has all the latest fixes included.
Since you confirmed this issue has been solved for you i will close this issue.

@BlackDex commented on GitHub (Oct 12, 2020): @ChrisMagnuson version 1.17.0 has been released which has all the latest fixes included. Since you confirmed this issue has been solved for you i will close this issue.
Author
Owner

@ChrisMagnuson commented on GitHub (Oct 15, 2020):

Just to complete the loop, yes this did fix the issue and emails look great and work as expected now, thank you!

@ChrisMagnuson commented on GitHub (Oct 15, 2020): Just to complete the loop, yes this did fix the issue and emails look great and work as expected now, thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#710