Esempio n. 1
0
        public virtual async Task <IActionResult> SetCurrency(string customerCurrency, string returnUrl = "")
        {
            await _commonViewModelService.SetCurrency(customerCurrency);

            //home page
            if (String.IsNullOrEmpty(returnUrl))
            {
                returnUrl = Url.RouteUrl("HomePage");
            }

            //prevent open redirection attack
            if (!Url.IsLocalUrl(returnUrl))
            {
                returnUrl = Url.RouteUrl("HomePage");
            }

            return(Redirect(returnUrl));
        }