mirror of
https://github.com/bitwarden/server.git
synced 2024-12-01 13:43:23 +01:00
[Provider] Resolve email not being url encoded (#1483)
This commit is contained in:
parent
792fb377dd
commit
eb846f7627
@ -660,8 +660,8 @@ namespace Bit.Core.Services
|
|||||||
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||||
SiteName = _globalSettings.SiteName,
|
SiteName = _globalSettings.SiteName,
|
||||||
ProviderId = provider.Id.ToString(),
|
ProviderId = provider.Id.ToString(),
|
||||||
Email = email,
|
Email = WebUtility.UrlEncode(email),
|
||||||
Token = token,
|
Token = WebUtility.UrlEncode(token),
|
||||||
};
|
};
|
||||||
await AddMessageContentAsync(message, "Provider.ProviderSetupInvite", model);
|
await AddMessageContentAsync(message, "Provider.ProviderSetupInvite", model);
|
||||||
message.Category = "ProviderSetupInvite";
|
message.Category = "ProviderSetupInvite";
|
||||||
@ -674,11 +674,11 @@ namespace Bit.Core.Services
|
|||||||
var model = new ProviderUserInvitedViewModel
|
var model = new ProviderUserInvitedViewModel
|
||||||
{
|
{
|
||||||
ProviderName = CoreHelpers.SanitizeForEmail(providerName),
|
ProviderName = CoreHelpers.SanitizeForEmail(providerName),
|
||||||
Email = WebUtility.UrlDecode(providerUser.Email),
|
Email = WebUtility.UrlEncode(providerUser.Email),
|
||||||
ProviderId = providerUser.ProviderId.ToString(),
|
ProviderId = providerUser.ProviderId.ToString(),
|
||||||
ProviderUserId = providerUser.Id.ToString(),
|
ProviderUserId = providerUser.Id.ToString(),
|
||||||
ProviderNameUrlEncoded = WebUtility.UrlEncode(providerName),
|
ProviderNameUrlEncoded = WebUtility.UrlEncode(providerName),
|
||||||
Token = token,
|
Token = WebUtility.UrlEncode(token),
|
||||||
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
|
||||||
SiteName = _globalSettings.SiteName,
|
SiteName = _globalSettings.SiteName,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user