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

fix(files): properly forward open params from short urls #50807

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

skjnldsv
Copy link
Member

@skjnldsv skjnldsv commented Feb 14, 2025

Fix #50155

@skjnldsv skjnldsv force-pushed the fix/redirect-openfile-param branch from 93c4754 to 0aeb29e Compare February 14, 2025 09:47
@skjnldsv skjnldsv self-assigned this Feb 14, 2025
@skjnldsv skjnldsv added this to the Nextcloud 31 milestone Feb 14, 2025
@skjnldsv
Copy link
Member Author

/backport to stable31

@skjnldsv
Copy link
Member Author

/backport to stable30

@skjnldsv
Copy link
Member Author

/backport to stable29

@skjnldsv skjnldsv force-pushed the fix/redirect-openfile-param branch from 0aeb29e to adcd9b9 Compare February 14, 2025 09:49
@skjnldsv skjnldsv marked this pull request as ready for review February 14, 2025 09:50
@skjnldsv skjnldsv force-pushed the fix/redirect-openfile-param branch from adcd9b9 to 70394e0 Compare February 14, 2025 09:50
if (!isset($this->loadedApps['core'])) {
$this->loadedApps['core'] = true;
$this->useCollection('root');
$this->setupRoutes($this->getAttributeRoutes('core'), 'core');
require_once __DIR__ . '/../../../core/routes.php';
require __DIR__ . '/../../../core/routes.php';
Copy link
Member Author

@skjnldsv skjnldsv Feb 14, 2025

Choose a reason for hiding this comment

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

This is an important point.
After a debug session with Christoph, we realised that it prevented routes.php files to be included again when running tests. Making any subsequent route generation fail.

Considering we already test that app have been loaded with isset($this->loadedApps['core']) and isset($this->loadedApps[$app]), we assumed it was safe to require/include without _once.

@skjnldsv skjnldsv force-pushed the fix/redirect-openfile-param branch from 70394e0 to d4e9a9c Compare February 14, 2025 09:53
@skjnldsv skjnldsv force-pushed the fix/redirect-openfile-param branch from d4e9a9c to 93fc392 Compare February 14, 2025 10:15
@skjnldsv skjnldsv requested review from come-nc, susnux, ChristophWurst, a team, ArtificialOwl and icewind1991 and removed request for a team February 14, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Internal links lose openfile parameter value
1 participant