1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-25 12:45:18 +01:00

[Provider] Resolve email not being url encoded (#1483)

This commit is contained in:
Oscar Hinton 2021-07-23 10:22:59 +02:00 committed by GitHub
parent 792fb377dd
commit eb846f7627
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -660,8 +660,8 @@ namespace Bit.Core.Services
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
SiteName = _globalSettings.SiteName,
ProviderId = provider.Id.ToString(),
Email = email,
Token = token,
Email = WebUtility.UrlEncode(email),
Token = WebUtility.UrlEncode(token),
};
await AddMessageContentAsync(message, "Provider.ProviderSetupInvite", model);
message.Category = "ProviderSetupInvite";
@ -674,11 +674,11 @@ namespace Bit.Core.Services
var model = new ProviderUserInvitedViewModel
{
ProviderName = CoreHelpers.SanitizeForEmail(providerName),
Email = WebUtility.UrlDecode(providerUser.Email),
Email = WebUtility.UrlEncode(providerUser.Email),
ProviderId = providerUser.ProviderId.ToString(),
ProviderUserId = providerUser.Id.ToString(),
ProviderNameUrlEncoded = WebUtility.UrlEncode(providerName),
Token = token,
Token = WebUtility.UrlEncode(token),
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
SiteName = _globalSettings.SiteName,
};