-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Colon in folder name followed by a number creates fatal error #25479
Comments
Hmmmm, indeed. I thought it was php-fpm specific but it also happens in my mod_php instance. |
It used to work in 8.1 => regression. I suspect it could be due to a Sabre lib update where URL handling might be different. Will try and find where it broke. |
stable8.2 is fine, stable9 is broken |
Indeed, it's the update to Sabre 3 eacb24c Let's see what needs adjusting |
Hmmmm... I tried writing a test but the test will properly URL encode the colon. |
Reproducible with a non-encoded colon:
It seems Sabre URI uses Ohhhh, it's even weirder: it's only with colon followed by numbers ! This works:
Found this: https://bugs.php.net/bug.php?id=55511 |
This is with php5-5.6.23-1.1.x86_64 @DeepDiver1975 do you see this behavior with PHP7 ? |
Two solutions:
and/or
|
let me try this ... |
same with php7 |
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: |
don't include the colon, it's where to body stores 💩 |
@PVince81 The regexes you've posted are negated by the |
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. |
Any volunteer to report this upstream on the PHP bugtracker ? Possibly someone who already has an account there. |
Workaround would be to have the clients url encode the colon. But it seems indeed to be a PHP bug, see https://bugs.php.net/bug.php?id=55511 |
Apparently the web UI properly encodes the colon, probably because we use |
Instead of patching Sabre\URI maybe patching Sabre\Request::getPath instead to pre-encode the colon so that when we pass it to Sabre\URI::parse it will work... |
WIP PR here that adds a test to reproduce the issue: #26773 The final fix will require upgrading sabre/uri after sabre-io/uri#9 is released |
This is also related: https://github.com/owncloud/enterprise/issues/1692 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Steps to reproduce
share
with user2share
with desktop clienttoday 12:00
Expected behaviour
folder
today 12:00
is synced or if colons are impossible in the OS it should be ignored.Actual behaviour
Internal server error
Logs
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:
Server configuration
Operating system: Raspbian 8
Web server: Nginx
Database: Mysql
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).
The text was updated successfully, but these errors were encountered: