Don't include credentials in URLs (fixes #118)

This commit is contained in:
Pierre Rudloff 2017-07-05 21:55:58 +02:00
parent 930bcdad8d
commit 480271a45e
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ class ViewFactory
$request = $request->withUri($request->getUri()->withScheme('https')->withPort(443)); $request = $request->withUri($request->getUri()->withScheme('https')->withPort(443));
} }
$smartyPlugins = new SmartyPlugins($container['router'], $request->getUri()); $smartyPlugins = new SmartyPlugins($container['router'], $request->getUri()->withUserInfo(null));
$view->registerPlugin('function', 'path_for', [$smartyPlugins, 'pathFor']); $view->registerPlugin('function', 'path_for', [$smartyPlugins, 'pathFor']);
$view->registerPlugin('function', 'base_url', [$smartyPlugins, 'baseUrl']); $view->registerPlugin('function', 'base_url', [$smartyPlugins, 'baseUrl']);

View file

@ -105,7 +105,7 @@ class FrontController
*/ */
public function index(Request $request, Response $response) public function index(Request $request, Response $response)
{ {
$uri = $request->getUri(); $uri = $request->getUri()->withUserInfo(null);
$this->view->render( $this->view->render(
$response, $response,
'index.tpl', 'index.tpl',