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

[7.0.3] DAV not accessible via Perl DAV #12150

Closed
JohnDoe42 opened this issue Nov 12, 2014 · 14 comments
Closed

[7.0.3] DAV not accessible via Perl DAV #12150

JohnDoe42 opened this issue Nov 12, 2014 · 14 comments
Assignees
Labels
Milestone

Comments

@JohnDoe42
Copy link

Tried the already uploaded 7.0.3 stable version. This does not allow my perl script to login to my owncloud anymore. Has been working since 6.0

$d = new HTTP::DAV;
$davurl = "https://my.cloud.com/remote.php/webdav/";
$d->credentials( -user=>"Perl",-pass =>"12345678901234567890", -url =>$davurl);
$d->open( -url=>$davurl )or die("Couldn't open $davurl: " .$d->message . "\n");

Error:

Couldn't open https://my.cloud.com/remote.php/webdav/: The URL "https://my.cloud.com/remote.php/webdav/" is not DAV enabled or not accessible.

When I downgrade to 7.0.2 everything is fine.

@LukasReschke
Copy link
Member

Any traffic dump?

@LukasReschke
Copy link
Member

Possibly related to #12123

@JohnDoe42
Copy link
Author

Sorry, had no time for that. This instance is in production so I needed to immediately go back to 7.0.2. But I think it will be reproducible with any 7.0.3 installation and the above script.

@LukasReschke
Copy link
Member

Litmus looks okay for me:

➜  ~  litmus "http://localhost/core/remote.php/webdav/" admin admin
-> running `basic':
 0. init.................. pass
 1. begin................. pass
 2. options............... pass
 3. put_get............... pass
 4. put_get_utf8_segment.. pass
 5. put_no_parent......... pass
 6. mkcol_over_plain...... pass
 7. delete................ pass
 8. delete_null........... pass
 9. delete_fragment....... pass
10. mkcol................. pass
11. mkcol_again........... pass
12. delete_coll........... pass
13. mkcol_no_parent....... pass
14. mkcol_with_body....... pass
15. finish................ pass
<- summary for `basic': of 16 tests run: 16 passed, 0 failed. 100.0%
-> running `copymove':
 0. init.................. pass
 1. begin................. pass
 2. copy_init............. pass
 3. copy_simple........... pass
 4. copy_overwrite........ pass
 5. copy_nodestcoll....... pass
 6. copy_cleanup.......... pass
 7. copy_coll............. pass
 8. copy_shallow.......... pass
 9. move.................. pass
10. move_coll............. pass
11. move_cleanup.......... pass
12. finish................ pass
<- summary for `copymove': of 13 tests run: 13 passed, 0 failed. 100.0%
-> running `props':
 0. init.................. pass
 1. begin................. pass
 2. propfind_invalid...... pass
 3. propfind_invalid2..... pass
 4. propfind_d0........... pass
 5. propinit.............. pass
 6. propset............... pass
 7. propget............... pass
 8. propextended.......... pass
 9. propmove.............. pass
10. propget............... pass
11. propdeletes........... pass
12. propget............... pass
13. propreplace........... pass
14. propget............... pass
15. propnullns............ pass
16. propget............... pass
17. prophighunicode....... pass
18. propget............... pass
19. propremoveset......... pass
20. propget............... pass
21. propsetremove......... pass
22. propget............... pass
23. propvalnspace......... pass
24. propwformed........... pass
25. propinit.............. pass
26. propmanyns............ pass
27. propget............... pass
28. propcleanup........... pass
29. finish................ pass
<- summary for `props': of 30 tests run: 30 passed, 0 failed. 100.0%
-> running `locks':
 0. init.................. pass
 1. begin................. pass
 2. options............... pass
 3. precond............... pass
 4. init_locks............ pass
 5. put................... pass
 6. lock_excl............. pass
 7. discover.............. pass
 8. refresh............... pass
 9. notowner_modify....... pass
10. notowner_lock......... pass
11. owner_modify.......... pass
12. notowner_modify....... pass
13. notowner_lock......... pass
14. copy.................. pass
15. cond_put.............. pass
16. fail_cond_put......... pass
17. cond_put_with_not..... pass
18. cond_put_corrupt_token pass
19. complex_cond_put...... pass
20. fail_complex_cond_put. pass
21. unlock................ pass
22. fail_cond_put_unlocked pass
23. lock_shared........... pass
24. notowner_modify....... pass
25. notowner_lock......... pass
26. owner_modify.......... pass
27. double_sharedlock..... pass
28. notowner_modify....... pass
29. notowner_lock......... pass
30. unlock................ pass
31. prep_collection....... pass
32. lock_collection....... pass
33. owner_modify.......... pass
34. notowner_modify....... pass
35. refresh............... pass
36. indirect_refresh...... pass
37. unlock................ pass
38. unmapped_lock......... FAIL (LOCK on /core/remote.php/webdav/litmus/lockcoll/ via /core/remote.php/webdav/litmus/unmapped_url: 400 Bad request)
39. unlock................ SKIPPED
40. finish................ pass
-> 1 test was skipped.
<- summary for `locks': of 40 tests run: 39 passed, 1 failed. 97.5%
See debug.log for network/debug traces.
➜  ~  

Digging further...

@LukasReschke
Copy link
Member

Sorry, had no time for that. This instance is in production so I needed to immediately go back to 7.0.2. But I think it will be reproducible with any 7.0.3 installation and the above script.

Generally speaking: We cannot reproduce issues with so few informations and it is a major waste of time for developers trying to reproduce problems then.

I cannot reproduce the problem with your script and the 7.0.3 final. Please fill out the issue template and include some network traffic dumps. Thanks.
https://raw.githubusercontent.com/owncloud/core/master/issue_template.md

@LukasReschke LukasReschke added this to the need more information milestone Nov 12, 2014
@JohnDoe42
Copy link
Author

[SYN/ACK Foo]
Request: PROPFIND /owncloud/remote.php/webdav/ HTTP/1.1
Answer: HTTP/1.1 400 Bad Request (text/html)
[SYN/ACK Foo]
Request: PROPFIND /owncloud/remote.php/webdav/ HTTP/1.1
Answer: HTTP/1.1 400 Bad Request (text/html)
[Error]

PHP-Version: 5.6.2
nginx version: nginx/1.6.2
DB: sqlite
config: default
OS: Linux 3.17.1

@MorrisJobke
Copy link
Contributor

nginx version: nginx/1.6.2

Webserver config would be nice to have.

@JohnDoe42
Copy link
Author

user http http; worker_processes 8;

error_log stderr;

events {
        worker_connections  4096;
}


http {
        fastcgi_cache_path      /etc/nginx/cache
                                levels=1:2
                                keys_zone=ALL:100m
                                inactive=60m;

        fastcgi_cache_key       "$scheme$request_method$host$request_uri";
        include                         mime.types;
        default_type            application/octet-stream;
        index                           index.html index.htm index.php;

        log_format      main    '$remote_addr - $remote_user [$time_local]  $status '
                                '"$request" $body_bytes_sent "$http_referer" '
                                '"$http_user_agent" "$http_x_forwarded_for"';

        sendfile                        on;
        tcp_nopush                      on;
        tcp_nodelay                     on;
        types_hash_max_size     2048;
        keepalive_timeout       65;

      server {
        listen       80;
        server_name  domain.tld;
        root            /srv/http/xyz
        location ~ ^(.+?\.php)(/.*)?$ {
                try_files                       $1 =404;
                include                         fastcgi.conf;
                fastcgi_param           PATH_INFO $2;
                fastcgi_pass            unix:/run/php-fpm/php-fpm.sock;
                fastcgi_cache           ALL;
                fastcgi_cache_valid     200 60m;
        }
        }

}

This is the config with which I reproduced the bug (this is not the production config).

@MorrisJobke
Copy link
Contributor

@josh4trunks Can I ask you to have a quick look at the config if you see something suspicious?

@josh4trunks
Copy link
Contributor

@JohnDoe42
you aren't setting SCRIPT_FILENAME.
please see http://doc.owncloud.org/server/7.0/admin_manual/installation/configuration_nginx.html

I don't know if this is the cause of the issue. if you'd like i can test within the next few days with my test instance.

@josh4trunks
Copy link
Contributor

I have no idea why you'd use this regex
^(.+?\.php)(/.*)?$

in the first capture, you should use (.*\.php) instead of (.+?\.php), secondly I doubt any file is named .php so it should actually be (.+\.php)

in the second capture why would you make it double optional? just use (/.+)?

@JohnDoe42
Copy link
Author

  1. This config works with 7.0.2 in every way.
  2. This config has been working since 6.0

My production config looks a bit smarter (yes, I do not use this regex bull.... in my production environment) but my testing instance is configed as advised here:
http://doc.owncloud.org/server/6.0/admin_manual/installation/installation_source.html

For debugging purposes I broke it down to the config posted above.

Nevertheless. This is not a problem of the nginx config. Else this would occur in 7.0.2 and 7.0.3 - but it does not! If no one else can reproduce it I may bisect this until saturday.

@volker-fr
Copy link

Try to update your config as described in #12123 I assume it is a bug in owncloud that can't deal with the port provided in the header.

@LukasReschke LukasReschke self-assigned this Nov 13, 2014
@LukasReschke LukasReschke modified the milestones: need more information, 2014-sprint-08-current Nov 13, 2014
@JohnDoe42
Copy link
Author

@volker-fr That works for me. Thx!

LukasReschke added a commit that referenced this issue Nov 13, 2014
This lead to a lot of confusion in the past and did not really offer any value. Let's remove the port check therefore. (it's anyways not really a part of the domain)

Fixes #12150 and #12123 and also a problem reported by @DeepDiver1975.
LukasReschke added a commit that referenced this issue Nov 18, 2014
This lead to a lot of confusion in the past and did not really offer any value. Let's remove the port check therefore. (it's anyways not really a part of the domain)

Fixes #12150 and #12123 and also a problem reported by @DeepDiver1975.

Conflicts:
	lib/private/request.php
@lock lock bot locked as resolved and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants