Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use file as template parameter #10614

Merged
merged 1 commit into from
Aug 9, 2018

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Aug 9, 2018

Using file will overwrite the $file parameter in the template base.
Leading to trying to include a file that is the exception message. Which
will of course fail.

See: https://sentry.rullzer.com/share/issue/5b5ae2d0777e4ac7915de8c846c21098/

@rullzer rullzer added bug 3. to review Waiting for reviews labels Aug 9, 2018
@rullzer rullzer added this to the Nextcloud 14 milestone Aug 9, 2018
@rullzer rullzer requested a review from ChristophWurst August 9, 2018 12:29
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 🙊 🙉

@rullzer rullzer requested review from nickvergessen and blizzz August 9, 2018 12:32
@@ -249,7 +249,7 @@ public function afterException($controller, $methodName, \Exception $exception):
$url = $this->urlGenerator->linkToRoute('core.login.showLoginForm', $params);
$response = new RedirectResponse($url);
} else {
$response = new TemplateResponse('core', '403', ['file' => $exception->getMessage()], 'guest');
$response = new TemplateResponse('core', '403', ['message' => $exception->getMessage()], 'guest');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe trying to assign predefined parameters should throw an error
And only work via a ->forceAssign method?

@rullzer rullzer mentioned this pull request Aug 9, 2018
45 tasks
Using file will overwrite the $file parameter in the template base.
Leading to trying to include a file that is the exception message. Which
will of course fail.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer rullzer force-pushed the bugfix/noid/fix_including_invalid_file branch from 2266de2 to 8c1e75e Compare August 9, 2018 14:45
@rullzer rullzer merged commit f630b12 into master Aug 9, 2018
@rullzer rullzer deleted the bugfix/noid/fix_including_invalid_file branch August 9, 2018 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants