mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-07-29 22:05:05 +03:00
Always send initOrganization and orgUserHasExistingUser in org invite URL (#7482)
The bundled web vault (2026.6.4) requires seven query parameters in the accept-organization URL and rejects the invite client-side when any of them is null, showing only "Unable to accept invitation" without sending a request to the server. send_invite() never appended initOrganization, and appended orgUserHasExistingUser only for users who already had an account, so every organization invitation e-mail produced a link that could not be accepted. Web vault 2026.4.1 (shipped with 1.36.0) read these parameters null-safely, which is why this only appeared in 1.37.0. Fixes #7481 Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
46ae59eaf4
commit
2629bcbe13
+12
-3
@@ -307,9 +307,18 @@ pub async fn send_invite(
|
|||||||
if CONFIG.sso_enabled() && CONFIG.sso_only() {
|
if CONFIG.sso_enabled() && CONFIG.sso_only() {
|
||||||
query_params.append_pair("orgSsoIdentifier", &org_id);
|
query_params.append_pair("orgSsoIdentifier", &org_id);
|
||||||
}
|
}
|
||||||
if user.private_key.is_some() {
|
|
||||||
query_params.append_pair("orgUserHasExistingUser", "true");
|
// The web vault requires both of these parameters to be present.
|
||||||
}
|
// If either is missing it rejects the invite client-side, before any
|
||||||
|
// request reaches the server, showing only "Unable to accept invitation".
|
||||||
|
query_params.append_pair("initOrganization", "false");
|
||||||
|
|
||||||
|
let org_user_has_existing_user = if user.private_key.is_some() {
|
||||||
|
"true"
|
||||||
|
} else {
|
||||||
|
"false"
|
||||||
|
};
|
||||||
|
query_params.append_pair("orgUserHasExistingUser", org_user_has_existing_user);
|
||||||
}
|
}
|
||||||
|
|
||||||
let Some(query_string) = query.query() else {
|
let Some(query_string) = query.query() else {
|
||||||
|
|||||||
Reference in New Issue
Block a user