web/satellite: Encode email in registration success URL

Properly encode email sent to the signup success URL so that emails with
symbols like `+` are processed and displayed properly.

Change-Id: I2d24ae08dc6a540e1e24d6c7baf62d83a856cd68
This commit is contained in:
Moby von Briesen 2022-03-22 17:34:26 -04:00 committed by Egon Elbre
parent ba74cb17a9
commit 09bb0c6110

View File

@ -584,8 +584,8 @@ export default class RegisterArea extends Vue {
const internalRegisterSuccessPath = RouteConfig.RegisterSuccess.path;
const configuredRegisterSuccessPath = MetaUtils.getMetaContent('optional-signup-success-url') || internalRegisterSuccessPath;
const nonBraveSuccessPath = `${configuredRegisterSuccessPath}?email=${this.user.email}`;
const braveSuccessPath = `${internalRegisterSuccessPath}?email=${this.user.email}`;
const nonBraveSuccessPath = `${configuredRegisterSuccessPath}?email=${encodeURIComponent(this.user.email)}`;
const braveSuccessPath = `${internalRegisterSuccessPath}?email=${encodeURIComponent(this.user.email)}`;
await this.detectBraveBrowser() ? await this.$router.push(braveSuccessPath) : window.location.href = nonBraveSuccessPath;
} catch (error) {