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

\OC\AppFramework\Http\Request::getRawPathInfo does not correctly parse app name from URLs with "." #5853

Closed
ostrolucky opened this issue Jul 24, 2017 · 2 comments
Labels
1. to develop Accepted and waiting to be taken care of bug good first issue Small tasks with clear documentation about how and in which place you need to fix things in. low

Comments

@ostrolucky
Copy link

ostrolucky commented Jul 24, 2017

\OC\AppFramework\Http\Request::getRawPathInfo apparently does not work correctly with dots in path.

In remote.php $request->getPathInfo() for this path:

https://example.com/remote.php/dav/files/gadelat/Dropbox/src/php/AppEventDispatcher/vendor/kevinlebrun
it will return
/dav/files/gadelat/Dropbox/src/php/AppEventDispatcher/vendor/kevinlebrun,

but this path
https://example.com/remote.php/dav/files/gadelat/Dropbox/src/php/AppEventDispatcher/vendor/kevinlebrun/colors.php/
will return
remote.php/dav/files/gadelat/Dropbox/src/php/AppEventDispatcher/vendor/kevinlebrun/colors.php/

which causes it to not find correct app and therefore returns 502 error

@MorrisJobke MorrisJobke added bug low good first issue Small tasks with clear documentation about how and in which place you need to fix things in. labels Aug 30, 2017
@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Oct 1, 2018
@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 12, 2019
@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Aug 20, 2020
@solracsf solracsf changed the title \OC\AppFramework\Http\Request::getRawPathInfo Does not correctly parse app name from URLs with "." \OC\AppFramework\Http\Request::getRawPathInfo does not correctly parse app name from URLs with "." Dec 30, 2021
@sylvainmetayer
Copy link
Contributor

I tried to reproduce the test case in tests/lib/AppFramework/Http/RequestTest.php however this seems to work fine.

	/**
	 * @return array
	 */
	public function genericPathInfoProvider() {
		return [
			['/remote.php/dav/files/gadelat/Dropbox/src/php/AppEventDispatcher/vendor/kevinlebrun', 'remote.php', '/dav/files/gadelat/Dropbox/src/php/AppEventDispatcher/vendor/kevinlebrun'],
			['/remote.php/dav/files/gadelat/Dropbox/src/php/AppEventDispatcher/vendor/kevinlebrun/colors.php/', 'remote.php', '/dav/files/gadelat/Dropbox/src/php/AppEventDispatcher/vendor/kevinlebrun/colors.php/'],
		];
	}

Does this bug still exists or has it been fixed since ?

@ostrolucky
Copy link
Author

No idea. But since this is such an old issue, let's just close

@ostrolucky ostrolucky closed this as not planned Won't fix, can't repro, duplicate, stale Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug good first issue Small tasks with clear documentation about how and in which place you need to fix things in. low
Projects
None yet
Development

No branches or pull requests

7 participants