    public function onRouteShutdown(Enlight_Controller_EventArgs $args)
    {
        $request = $args->getRequest();
        $response = $args->getResponse();

        if (!Shopware()->Container()->initialized('shop')) {
            return;
        }

        $shop = $this->get('shop');
        if ($request->getHttpHost() !== $shop->getHost()) {
            if ($request->isSecure()) {
                $newPath = 'https://' . $shop->getHost() . $request->getRequestUri();
            } else {
                $newPath = 'http://' . $shop->getHost() . $shop->getBaseUrl();
            }
        }

        // Strip /shopware.php/ from string and perform a redirect
        $preferBasePath = $this->get(Shopware_Components_Config::class)->get('preferBasePath');
        if ($preferBasePath && str_starts_with($request->getPathInfo(), '/shopware.php/')) {
            $removePath = $request->getBasePath() . '/shopware.php';
            $newPath = str_replace($removePath, $request->getBasePath(), $request->getRequestUri());
            $newPath = preg_replace('/\/{2,}/', '/', $newPath);
        }

        if (isset($newPath)) {
            // reset the cookie so only one valid cookie will be set IE11 fix
            $basePath = $shop->getBasePath();
            if ($basePath === null || $basePath === '') {
                $basePath = '/';
            }
            $response->headers->setCookie(new Cookie('session-' . $shop->getId(), '', 1, $basePath));
            $response->setRedirect($newPath, 301);
        } else {
            $this->upgradeShop($request, $response);
            $this->initServiceMode($request);
        }

        $this->get(ContextServiceInterface::class)->initializeShopContext();
    }
A web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a Redirect. This simplifies phishing attacks.