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

Opening an invalid direct link triggers a error exception page #952

Closed
LukasReschke opened this issue Aug 18, 2016 · 3 comments
Closed

Opening an invalid direct link triggers a error exception page #952

LukasReschke opened this issue Aug 18, 2016 · 3 comments
Assignees
Labels

Comments

@LukasReschke
Copy link
Member

To reproduce access an not existing invalid direct link such as https://cloud.nextcloud.com/f/1357

Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Technical details
Remote Address: 81.62.83.43
Request ID: d7uNkztsOKoW+weoXuht
Type: OCP\Files\NotFoundException
Code: 0
Message:
File: /var/www/html/apps/files/lib/Controller/ViewController.php
Line: 309

Trace
#0 [internal function]: OCA\Files\Controller\ViewController->showFile('1357')
#1 /var/www/html/lib/private/AppFramework/Http/Dispatcher.php(160): call_user_func_array(Array, Array)
#2 /var/www/html/lib/private/AppFramework/Http/Dispatcher.php(90): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Files\Controller\ViewController), 'showFile')
#3 /var/www/html/lib/private/AppFramework/App.php(111): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files\Controller\ViewController), 'showFile')
#4 /var/www/html/lib/public/AppFramework/App.php(136): OC\AppFramework\App::main('ViewController', 'showFile', Object(OC\AppFramework\DependencyInjection\DIContainer))
#5 /var/www/html/core/routes.php(122): OCP\AppFramework\App->dispatch('ViewController', 'showFile')
#6 [internal function]: OC\Route\Router->{closure}(Array)
#7 /var/www/html/lib/private/Route/Router.php(293): call_user_func(Object(Closure), Array)
#8 /var/www/html/lib/base.php(967): OC\Route\Router->match('/f/1357')
#9 /var/www/html/index.php(48): OC::handleRequest()
#10 {main}

This should be caught instead and a 404 be displayed instead of spamming the server log.

@LukasReschke LukasReschke added this to the Nextcloud 10.0 milestone Aug 18, 2016
@rullzer
Copy link
Member

rullzer commented Aug 19, 2016

Yes agreed. I'll take care of this.

@rullzer rullzer self-assigned this Aug 19, 2016
@rullzer
Copy link
Member

rullzer commented Aug 19, 2016

Do we want to show the actual 404 page or just redirect to files?

rullzer added a commit that referenced this issue Aug 19, 2016
Fixes #952

* Use only the index route (since it went to showFile anyways)
* Fix tests
* Use getUserFolder to force init of users mounts
@rullzer
Copy link
Member

rullzer commented Aug 19, 2016

Fix is in #956

rullzer added a commit that referenced this issue Aug 23, 2016
Fixes #952

* Use only the index route (since it went to showFile anyways)
* Fix tests
* Use getUserFolder to force init of users mounts
rullzer added a commit that referenced this issue Aug 23, 2016
Fixes #952

* Use only the index route (since it went to showFile anyways)
* Fix tests
* Use getUserFolder to force init of users mounts
GitHubUser4234 pushed a commit to GitHubUser4234/server that referenced this issue Aug 30, 2016
Fixes nextcloud#952

* Use only the index route (since it went to showFile anyways)
* Fix tests
* Use getUserFolder to force init of users mounts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants