Closed Zauberfisch closed 3 years ago
I can confirm and limit the error scope somewhat: When doing an invite from the organisation screen this does give the right error. When doing a email verification from the user homescreen, it gives a screen "everything okey", even when failing.
I can confirm that this is still relevant and also affects the Test SMTP
(Send test email
) functionality in the admin panel.
I just caused an authentication error, but all tests were reported successful.
The server always returns errors when it gets them, but some client endpoints don't handle them and they always show success, there's not much we can do about those as they probably aren't related to bitwarden_rs.
That said, if this happens in the admin panel we should be handling them correctly, @sekdiy can you check the network requests tab in your browser to see what response you get from the /admin/test/smtp/ endpoint?
@dani-garcia I think this is in fact a bitwarden_rs issue.
In the log file I posted, the last line says:
Jan 01 00:22:54 bitwarden.my-domain.com bitwarden_rs[633]: [2020-01-01 00:22:54][_][INFO] Outcome: Success
The Outcome: Success
leads me to believe this is wrongly handled on the server
When I click on "Verify Email -> Send Email" on a new Account, the HTTP Response is an empty body with the following headers:
HTTP/1.1 200 OK
Server: Rocket
Feature-Policy: accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; camera 'none'; encrypted-media 'none'; fullscreen 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none'; picture-in-picture 'none'; sync-xhr 'self' https://haveibeenpwned.com https://twofactorauth.org; usb 'none'; vr 'none'
Referrer-Policy: same-origin
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Security-Policy: frame-ancestors 'self' chrome-extension://nngceckbapebfimnlniiiahkandclblb moz-extension://*;
Cache-Control: no-cache, no-store, max-age=0
Access-Control-Allow-Origin: https://bitwarden.my-domain.com
Content-Length: 0
Date: Thu, 14 May 2020 12:21:07 GMT
I agree with @Zauberfisch I also saw the success originating from bitwarden_rs in the logs when I looked into this.
There have been a lot changes done to the email library since the last comment here. If this still is an issue please give some more details.
1.16.3 as of today - the issue is still there.
@l0rem Could you give us an example maybe, which steps to reproduce this, and what message do you get in the logs?
@Zauberfisch, @l0rem and @sekdiy Have you tried v1.17.0 already? That version includes a lot of changes to handling emails and has some better error reporting. And does it still produce any error.
Also, i just have create a new PR #1229 which could help in trying to debug this issue. We have to wait for this PR to be merged for you to test (unless you build it your self).
As of today there is a new testing
version available on docker hub which has among an updated mail library, also an SMTP_DEBUG option available. Maybe this could help i troubleshooting this issue.
Going to close this one because of inactivity and there have been some more changes done including the SMTP_DEBUG
option.
If this issue still is unsolvable using that feature please feel free to re-open this ticket.
Subject of the issue
When bitwarden_rs tries to send emails via SMTP, not all errors will actually be recognised as errors.
Your environment
bitwarden_rs
andbitwarden_rs-vault
Steps to reproduce
Started through systemd unit file from AUR package
Cause one of the following errors when sending via SMTP:
Expected behaviour
UI should tell the user that sending an email failed
Actual behaviour
Green notification pops up saying it was sent
Relevant logs