From 2fcac7444e6b24619727dd9852028539acb5de02 Mon Sep 17 00:00:00 2001 From: Keyfer Mathewson Date: Wed, 26 Aug 2020 12:56:23 -0400 Subject: [PATCH] EncodeURI origin app-bridge --- packages/koa-shopify-auth/CHANGELOG.md | 4 +++- packages/koa-shopify-auth/src/auth/redirection-page.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/koa-shopify-auth/CHANGELOG.md b/packages/koa-shopify-auth/CHANGELOG.md index 2a16d50ca2..4b0892ee9a 100644 --- a/packages/koa-shopify-auth/CHANGELOG.md +++ b/packages/koa-shopify-auth/CHANGELOG.md @@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## [Unreleased] + +- URI encode `config` on redirection page [1612](https://github.com/Shopify/quilt/pull/1612) ## [3.1.65] - 2020-07-06 diff --git a/packages/koa-shopify-auth/src/auth/redirection-page.ts b/packages/koa-shopify-auth/src/auth/redirection-page.ts index 70908b89b5..658f32fbd0 100644 --- a/packages/koa-shopify-auth/src/auth/redirection-page.ts +++ b/packages/koa-shopify-auth/src/auth/redirection-page.ts @@ -12,7 +12,7 @@ export default function redirectionScript({origin, redirectTo, apiKey}) { var Redirect = AppBridge.actions.Redirect; var app = createApp({ apiKey: '${apiKey}', - shopOrigin: '${origin}', + shopOrigin: '${encodeURI(origin)}', }); var redirect = Redirect.create(app); redirect.dispatch(Redirect.Action.REMOTE, '${redirectTo}');