Skip to content
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

Invitation email is broken #1000

Closed
dotKuro opened this issue May 19, 2020 · 15 comments
Closed

Invitation email is broken #1000

dotKuro opened this issue May 19, 2020 · 15 comments

Comments

@dotKuro
Copy link

dotKuro commented 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.

@dani-garcia
Copy link
Owner

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.

@dotKuro
Copy link
Author

dotKuro commented 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!

@fredbcode
Copy link

fredbcode commented May 25, 2020

Hello, I confirm the issue same problem here

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

@mikkelnl
Copy link

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

@ced455
Copy link

ced455 commented Jul 5, 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.

@dotKuro
Copy link
Author

dotKuro commented 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.

@ced455
Copy link

ced455 commented 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)

@5hay
Copy link

5hay commented 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).

@Mithror
Copy link

Mithror commented Sep 20, 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

@BlackDex
Copy link
Collaborator

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

@ChrisMagnuson
Copy link

ChrisMagnuson commented Oct 8, 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.

@BlackDex
Copy link
Collaborator

BlackDex commented Oct 8, 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
Copy link
Collaborator

BlackDex commented Oct 8, 2020

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

@BlackDex
Copy link
Collaborator

@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.

@ChrisMagnuson
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants