-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Respect RFC2616 Section 5.1.2 and allow absoluteURI #28131
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
Conversation
|
the same applies to the old endpoint as well .... |
|
|
shouldn't this be part of Sabre instead ? |
quite valid question .... but who will answer this :-( |
the ghosts of Webdav past submit a ticket upstream ? |
|
or maybe it's our base uri that is wrong ? |
94c0380 to
dd71f20
Compare
|
@DeepDiver1975 any news? |
|
there is one failing test which needs attention - see https://jenkins.owncloud.org/job/owncloud-core/job/core/job/PR-28131/3/ on it .... |
|
php is killing me ... https://bugs.php.net/bug.php?id=70942 |
|
classic... we had to put a workaround in Sabre URI code because of that... |
oh - mind pointing me to the fix? |
|
thx |
| } else { | ||
| $components = parse_url($uri); | ||
| if ($components === false) { | ||
| $components = parse_url("http://localhost$uri"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localhost ?
If this is legit, please add a PHP comment to explain what and why
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is to trick the parse_url function - will add comment
98477a4 to
718b0c3
Compare
PVince81
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
does backporting make sense ? not critical afaik |
|
we need this at least in stable10 - @michaelstingl 9.1 as well? |
I've no request for 9.1.x |
|
Will this be in 10.0.3 release? |
yes |
|
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. |
From https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2
Currently, this happens:
{"Message":"Requested uri (http:\/\/localhost\/owncloud\/remote.php\/webdav\/) is out of base uri (\/owncloud\/remote.php\/webdav\/)","Code":0,"Trace":" #0 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(1279): Sabre\\HTTP\\Request->getPath() #1 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(464): Sabre\\DAV\\Server->checkPreconditions(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response)) #2 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response)) #3 \/var\/www\/owncloud\/apps\/files\/appinfo\/remote.php(83): Sabre\\DAV\\Server->exec() #4 \/var\/www\/owncloud\/remote.php(132): require_once('\/var\/www\/ownclo...') #5 {main}","File":"\/var\/www\/owncloud\/3rdparty\/sabre\/http\/lib\/Request.php","Line":210}Also see client Issue: owncloud/client#3881
Test with absolute.php (adjust
$host,$user,$passwordand$pathas necessary, only works against http )This PR ignores the host, as the OC::$WEBROOT ignores it as well.