mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-11 09:13:02 +03:00
Opening an invitation link from Office365 webmail gives you a wrong URL leading to a 404 Not Found on account creation #1181
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Minaru on GitHub.
Subject of the issue
When inviting a user to join a vaultwarden instance and said user attempts to click join link from office365 webmail browser client, user is directed to a bad URL which leads them to a 404 not found message when attempting to validate their account creation
Said user can however log in a web client application (i.e. Outlook), open the same mail, click on the join link in the vaultwarden invitation email, and gets a proper URL which leads them to a successful account creation when attempting to validate
Deployment environment
Your environment (Generated via diagnostics page)
Config (Generated via diagnostics page)
Show Running Config
Environment settings which are overridden: ADMIN_TOKEN
vaultwarden version: 1.24.0
Install method: Docker (Base: Debian 10)
Clients used: Web Vault
Reverse proxy and version: Nginx 1.14.2
Other relevant details: N/A
Steps to reproduce
Log in Admin panel and go in the Users tab.
Invite a new User.
Said user receives an invitation email to join the vaultwarden instance
User clicks on link in their email
When prompted to "Log in" or "Create account", they "Create account" since they do not have an account yet (1)
User fills their name and master password + confirmation
User clicks Submit
Expected behaviour
User gets redirected to log in screen with a notification that says their account is created

Actual behaviour
User gets a 404 not found notification

Troubleshooting data
WEBCLIENT CASE
When opening link from webclient, user gets this link:
https://<host>/?organizationId=_&organizationUserId=_&email=<first_name>%2E<last_name>%40<domain>%2E<country_tld>&organizationName=Vaultwarden&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJuYmYiOjE2NDc2MjY0NzYsImV4cCI6MTY0ODA1ODQ3NiwiaXNzIjoiaHR0cHM6Ly92YXVsdHdhcmRlbi1yZC5wcml2LnNld2FuLmZyfGludml0ZSIsInN1YiI6IjMwYWJhMzE1LTRjZTQtNDJhYy1hYzY2LThmODE3OTg2M2VjMiIsImVtYWlsIjoibWF4aW1lLmRlbW9kZUBzZXdhbi5mciIsIm9yZ19pZCI6bnVsbCwidXNlcl9vcmdfaWQiOm51bGwsImludml0ZWRfYnlfZW1haWwiOm51bGx9.eo_F4iV5LkI8NTJXxINm7ZbXnSkQ-hqY-SwU0ZyPXHUUMCZwXYA2po9g-WsmcuKkOGTx7tlm8dIbhTyzF3QHXBFRM3_q4NgUNuJi8ModyztYq_oibqBCo0UXuQALAWsyjZpcU9jjALuUdov3C_AW-ZG15ul4qmFlqMnhtJMyywKvrXbNtKAPJBURBTMWuRms835EOUp_-QyzlHNkenYoQbzCF2jmE_-lMHBB6qyyt2y-D5VnrevWtF_XrrceuGLCiNLPjLLUf-tHXM12klgfMuKM5ftgv2OMdrtIzugn-_v7HorP39aZpf6FSQJEPeBV8kb5iW93AXlAzigWbrICjw#/accept-organization?organizationId=_&organizationUserId=_&email=<first_name>.<last_name>@<domain>.<country_tld>&organizationName=Vaultwarden&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJuYmYiOjE2NDc2MjY0NzYsImV4cCI6MTY0ODA1ODQ3NiwiaXNzIjoiaHR0cHM6Ly92YXVsdHdhcmRlbi1yZC5wcml2LnNld2FuLmZyfGludml0ZSIsInN1YiI6IjMwYWJhMzE1LTRjZTQtNDJhYy1hYzY2LThmODE3OTg2M2VjMiIsImVtYWlsIjoibWF4aW1lLmRlbW9kZUBzZXdhbi5mciIsIm9yZ19pZCI6bnVsbCwidXNlcl9vcmdfaWQiOm51bGwsImludml0ZWRfYnlfZW1haWwiOm51bGx9.eo_F4iV5LkI8NTJXxINm7ZbXnSkQ-hqY-SwU0ZyPXHUUMCZwXYA2po9g-WsmcuKkOGTx7tlm8dIbhTyzF3QHXBFRM3_q4NgUNuJi8ModyztYq_oibqBCo0UXuQALAWsyjZpcU9jjALuUdov3C_AW-ZG15ul4qmFlqMnhtJMyywKvrXbNtKAPJBURBTMWuRms835EOUp_-QyzlHNkenYoQbzCF2jmE_-lMHBB6qyyt2y-D5VnrevWtF_XrrceuGLCiNLPjLLUf-tHXM12klgfMuKM5ftgv2OMdrtIzugn-_v7HorP39aZpf6FSQJEPeBV8kb5iW93AXlAzigWbrICjwWhen they click "Create Account" from this link, they get to this link:
https://<host>/?organizationId=_&organizationUserId=_&email=<first_name>%2E<last_name>%40<domain>%2E<country_tld>&organizationName=Vaultwarden&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJuYmYiOjE2NDc2MjY0NzYsImV4cCI6MTY0ODA1ODQ3NiwiaXNzIjoiaHR0cHM6Ly92YXVsdHdhcmRlbi1yZC5wcml2LnNld2FuLmZyfGludml0ZSIsInN1YiI6IjMwYWJhMzE1LTRjZTQtNDJhYy1hYzY2LThmODE3OTg2M2VjMiIsImVtYWlsIjoibWF4aW1lLmRlbW9kZUBzZXdhbi5mciIsIm9yZ19pZCI6bnVsbCwidXNlcl9vcmdfaWQiOm51bGwsImludml0ZWRfYnlfZW1haWwiOm51bGx9.eo_F4iV5LkI8NTJXxINm7ZbXnSkQ-hqY-SwU0ZyPXHUUMCZwXYA2po9g-WsmcuKkOGTx7tlm8dIbhTyzF3QHXBFRM3_q4NgUNuJi8ModyztYq_oibqBCo0UXuQALAWsyjZpcU9jjALuUdov3C_AW-ZG15ul4qmFlqMnhtJMyywKvrXbNtKAPJBURBTMWuRms835EOUp_-QyzlHNkenYoQbzCF2jmE_-lMHBB6qyyt2y-D5VnrevWtF_XrrceuGLCiNLPjLLUf-tHXM12klgfMuKM5ftgv2OMdrtIzugn-_v7HorP39aZpf6FSQJEPeBV8kb5iW93AXlAzigWbrICjw#/register?email=<first_name>.<last_name>@<domain>.<country_tld>APPCLIENT (Outlook) CASE
When opening link from Outlook, user gets this link:
https://<host>/#/accept-organization?organizationId=_&organizationUserId=_&email=<first_name>.<last_name>@<domain>.<country_tld>&organizationName=Vaultwarden&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJuYmYiOjE2NDc2MjY0NzYsImV4cCI6MTY0ODA1ODQ3NiwiaXNzIjoiaHR0cHM6Ly92YXVsdHdhcmRlbi1yZC5wcml2LnNld2FuLmZyfGludml0ZSIsInN1YiI6IjMwYWJhMzE1LTRjZTQtNDJhYy1hYzY2LThmODE3OTg2M2VjMiIsImVtYWlsIjoibWF4aW1lLmRlbW9kZUBzZXdhbi5mciIsIm9yZ19pZCI6bnVsbCwidXNlcl9vcmdfaWQiOm51bGwsImludml0ZWRfYnlfZW1haWwiOm51bGx9.eo_F4iV5LkI8NTJXxINm7ZbXnSkQ-hqY-SwU0ZyPXHUUMCZwXYA2po9g-WsmcuKkOGTx7tlm8dIbhTyzF3QHXBFRM3_q4NgUNuJi8ModyztYq_oibqBCo0UXuQALAWsyjZpcU9jjALuUdov3C_AW-ZG15ul4qmFlqMnhtJMyywKvrXbNtKAPJBURBTMWuRms835EOUp_-QyzlHNkenYoQbzCF2jmE_-lMHBB6qyyt2y-D5VnrevWtF_XrrceuGLCiNLPjLLUf-tHXM12klgfMuKM5ftgv2OMdrtIzugn-_v7HorP39aZpf6FSQJEPeBV8kb5iW93AXlAzigWbrICjwWhen they click "Create Account" from this link, they get to this link:
https://<host>/#/register?email=<first_name>.<last_name>@<domain>.<country_tld>POTENTIAL ISSUE IDENTIFIED ?
From what I can see, when I click on the "Join" button from webclient, I get a malformed URL which inserts
?organizationId=_&organizationUserId=_&email=<first_name>%2E<last_name>%40<domain>%2E<country_tld>&organizationName=Vaultwarden&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJuYmYiOjE2NDc2MjY0NzYsImV4cCI6MTY0ODA1ODQ3NiwiaXNzIjoiaHR0cHM6Ly92YXVsdHdhcmRlbi1yZC5wcml2LnNld2FuLmZyfGludml0ZSIsInN1YiI6IjMwYWJhMzE1LTRjZTQtNDJhYy1hYzY2LThmODE3OTg2M2VjMiIsImVtYWlsIjoibWF4aW1lLmRlbW9kZUBzZXdhbi5mciIsIm9yZ19pZCI6bnVsbCwidXNlcl9vcmdfaWQiOm51bGwsImludml0ZWRfYnlfZW1haWwiOm51bGx9.eo_F4iV5LkI8NTJXxINm7ZbXnSkQ-hqY-SwU0ZyPXHUUMCZwXYA2po9g-WsmcuKkOGTx7tlm8dIbhTyzF3QHXBFRM3_q4NgUNuJi8ModyztYq_oibqBCo0UXuQALAWsyjZpcU9jjALuUdov3C_AW-ZG15ul4qmFlqMnhtJMyywKvrXbNtKAPJBURBTMWuRms835EOUp_-QyzlHNkenYoQbzCF2jmE_-lMHBB6qyyt2y-D5VnrevWtF_XrrceuGLCiNLPjLLUf-tHXM12klgfMuKM5ftgv2OMdrtIzugn-_v7HorP39aZpf6FSQJEPeBV8kb5iW93AXlAzigWbrICjwinbetween
https://<host>/and#/accept-organization?organizationId=_&organizationUserId=_&email=<first_name>.<last_name>@<domain>.<country_tld>&organizationName=Vaultwarden&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJuYmYiOjE2NDc2MjY0NzYsImV4cCI6MTY0ODA1ODQ3NiwiaXNzIjoiaHR0cHM6Ly92YXVsdHdhcmRlbi1yZC5wcml2LnNld2FuLmZyfGludml0ZSIsInN1YiI6IjMwYWJhMzE1LTRjZTQtNDJhYy1hYzY2LThmODE3OTg2M2VjMiIsImVtYWlsIjoibWF4aW1lLmRlbW9kZUBzZXdhbi5mciIsIm9yZ19pZCI6bnVsbCwidXNlcl9vcmdfaWQiOm51bGwsImludml0ZWRfYnlfZW1haWwiOm51bGx9.eo_F4iV5LkI8NTJXxINm7ZbXnSkQ-hqY-SwU0ZyPXHUUMCZwXYA2po9g-WsmcuKkOGTx7tlm8dIbhTyzF3QHXBFRM3_q4NgUNuJi8ModyztYq_oibqBCo0UXuQALAWsyjZpcU9jjALuUdov3C_AW-ZG15ul4qmFlqMnhtJMyywKvrXbNtKAPJBURBTMWuRms835EOUp_-QyzlHNkenYoQbzCF2jmE_-lMHBB6qyyt2y-D5VnrevWtF_XrrceuGLCiNLPjLLUf-tHXM12klgfMuKM5ftgv2OMdrtIzugn-_v7HorP39aZpf6FSQJEPeBV8kb5iW93AXlAzigWbrICjwThe inserted part from the webclient URL is the issues since it seems like if you concatenate the host part and the part starting with #/ you pretty much gets the proper URL that Outlook gives you.
@BlackDex commented on GitHub:
I have access. I will try tomorrow if i can see the same issue.
@BlackDex commented on GitHub:
I'm afraid that it is an issue with Outlook and not something we can fix at the Vaultwarden side.
@Minaru commented on GitHub:
Also, after the successful account creation via Outlook App link, if I try to click on "Verify Email Address Now" from webclient, I get:
If I try the same thing from Outlook App:
Most likely the same issue of malformed URL coming from webclient
@BlackDex commented on GitHub:
It seems to work for my Office365 environment. I also disabled all of my browser extensions just in case some of them try to fix tracking URL's. I'm not able to reproduce this.
Also, you say it does work on the mobile client, which to me indicates the mail is sent and received correctly and the link in the mail does work. I suggest to check if you can see something strange with the developer tools of the browser maybe.
Also, try to use a different browser, disable extensions, use a private/incognito tab to see if that helps.
@Minaru commented on GitHub:
I think so too since I just had a user successfully create their account from gmail webclient :(
I'm not sure if you have access to a professional Office365 account to verify that you can replicate ?
It could be linked to security settings on my company's side when filtering links coming from emails and not Microsoft as a whole.