Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Colon in folder name followed by a number creates fatal error #25479
Steps to reproduce
Internal server error
Web server error log
reported by user on the forum: https://forum.owncloud.org/viewtopic.php?f=38&t=37741 (OC 9.0.3, client 2.2.2 on OS X), more details not known (yet)
I verified this on a rPI2:
Operating system: Raspbian 8
Web server: Nginx
PHP version: php 5.6
ownCloud version: 9.0.3
Updated from an older ownCloud or fresh install: 9.0.0
Where did you install ownCloud from: repo
Signing status (ownCloud 9.0 and above): good
It's a basic setup, no 3rd-party apps, no encryption, no proxy, no external storage.
Client 2.2.2 shows error (Ubuntu 16.04/OS X).
Reproducible with a non-encoded colon:
It seems Sabre URI uses
Ohhhh, it's even weirder: it's only with colon followed by numbers !
Found this: https://bugs.php.net/bug.php?id=55511
Can a regexp expert tell me how to adjust https://github.com/fruux/sabre-uri/blob/master/lib/functions.php#L188 to also include the colon ? All my attempts failed...
These never seem to match the colon:
This would also escape the colon in the schema.
I think that PHP bug should be reopened though with better clarification and lining up with what rfc3986 says about this.
If we can get the PHP guys to confirm that it is indeed a bug, I think that that would be a better basis for creating the workaround for sabre/uri.
Make sure that whatever change you're making doesn't create incorrect result when the intention of the uri is to actually include a tcp port.