Client: [Windows] [2.5.1] PropagateUploadFileNG::doFinalMove fails on server URLs ending with /

Created on 29 Nov 2018  路  5Comments  路  Source: owncloud/client

Expected behaviour

PropagateUploadFileNG::doFinalMove should complete successfully on chunked uploads, independent of server url trailing '/' presence. There shouldn't be any duplicit slashes in request paths.

Actual behaviour

When a client account is configured with a server url containing a trailing '/':
0\url=https://owncloud.server.com/

and when uploading a chunked file, the PropagateUploadFileNG::doFinalMove method
fails with:

11-26 13:32:34:103 [ info sync.networkjob.move ]: MOVE of QUrl("https://owncloud.server.com/remote.php/dav/uploads/<user>/<tx-id>/.file") FINISHED WITH STATUS "ContentAccessDenied Server replied \"403 Forbidden\" do \"MOVE https://owncloud.server.com/remote.php/dav/uploads/<user>/<tx-id>/.file\""
11-26 13:32:34:104 [ info sync.database ]:  Setting blacklist entry for  "<large-file>" 1 "Server replied \"403 Forbidden\" do \"MOVE https://owncloud.server.com/remote.php/dav/uploads/<user>/<tx-id>/.file\" (Requested uri (//remote.php/dav/files/<user>/<large-file>) is out of base uri (/remote.php/dav/))"

as it obviously prefixes the destination URL with extraneous '/' when moving the file to the final destination. This leads to failed sync propagation.

Steps to reproduce

  1. Add an account having server url ending with '/'
  2. Create a new file large enough to be uploaded chunked
  3. Panic :)

Server configuration

_I believe the server is not involved here (will provide more info if needed)._

ownCloud version:
10.0.10

Client configuration

Client version:
2.5.1

Operating system:
Windows 10
(Linux client doesn't seem to be affected)

OS language:
EN

Logs

  1. Client logfile:
11-26 13:32:35:676 [ info sync.propagator ]:    Starting INSTRUCTION_NEW propagation of "<large-file-dir1>/<large-file-dir2>/<large-file>" by OCC::PropagateUploadFileNG(0xa9ed038)
11-26 13:32:36:659 [ info sync.networkjob.mkcol ]:      MKCOL of QUrl("https://owncloud.server.com/remote.php/dav/uploads/<user>/<tx-id>") FINISHED WITH STATUS "OK"
11-26 13:32:39:239 [ info sync.networkjob.put ]:        PUT of "https://owncloud.server.com/remote.php/dav/uploads/<user>/<tx-id>/00000000" FINISHED WITH STATUS "OK" QVariant(int, 201) QVariant(QString, "Created")
11-26 13:32:39:240 [ info sync.propagator.upload ]:     Chunked upload of 20973242 bytes took 4510 ms, desired is 60000 ms, expected good chunk size is 279023175 bytes and nudged next chunk size to  100000000 bytes
11-26 13:32:39:240 [ info sync.propagator.upload ]:     "///remote.php/dav/files/<user>/<sync-dir>/<large-file-dir1>/<large-file-dir2>/<large-file>" "SHA1:<sha>"
11-26 13:32:39:241 [ info sync.accessmanager ]: 6 "MOVE" "https://owncloud.server.com/remote.php/dav/uploads/<user>/<tx-id>/.file" has X-Request-ID "<rq-id>"
11-26 13:32:39:246 [ info sync.networkjob.put ]:        PUT of "https://owncloud.server.com/remote.php/dav/uploads/<user>/<tx-id>/00000000" FINISHED WITH STATUS "OK" QVariant(int, 201) QVariant(QString, "Created")
11-26 13:32:39:246 [ info sync.propagator.upload ]:     Chunked upload of 20973242 bytes took 4529 ms, desired is 60000 ms, expected good chunk size is 277852620 bytes and nudged next chunk size to  100000000 bytes
11-26 13:32:39:935 [ warning sync.networkjob ]: QNetworkReply::NetworkError(ContentAccessDenied) "Server replied \"403 Forbidden\" do \"MOVE https://owncloud.server.com/remote.php/dav/uploads/<user>/<tx-id>/.file\"" QVariant(int, 403)
11-26 13:32:39:935 [ info sync.networkjob.move ]:       MOVE of QUrl("https://owncloud.server.com/remote.php/dav/uploads/<user>/<tx-id>/.file") FINISHED WITH STATUS "ContentAccessDenied Server replied \"403 Forbidden\" do \"MOVE https://owncloud.server.com/remote.php/dav/uploads/<user>/<tx-id>/.file\""
11-26 13:32:39:936 [ warning sync.propagator ]: Probably firewall error:  403 , blacklisting up to 1h only
11-26 13:32:39:936 [ info sync.database ]:      Setting blacklist entry for  "<large-file-dir1>/<large-file-dir2>/<large-file>" 1 "Server replied \"403 Forbidden\" do \"MOVE https://owncloud.server.com/remote.php/dav/uploads/<user>/<tx-id>/.file\" (Requested uri (//remote.php/dav/files/<user>/<sync-dir>/<large-file-dir1>/<large-file-dir2>/<large-file>) is out of base uri (/remote.php/dav/))" 1543235559 25 1541588733 "" "" 0
11-26 13:32:39:936 [ warning sync.propagator ]: Could not complete propagation of "<large-file-dir1>/<large-file-dir2>/<large-file>" by OCC::PropagateUploadFileNG(0xa9ed538) with status 2 and error: "Server replied \"403 Forbidden\" do \"MOVE https://owncloud.server.com/remote.php/dav/uploads/<user>/<tx-id>/.file\" (Requested uri (//remote.php/dav/files/<user>/<sync-dir>/<large-file-dir1>/<large-file-dir2>/<large-file>) is out of base uri (/remote.php/dav/))"
11-26 13:32:39:938 [ info gui.socketapi ]:      Sending SocketAPI message --> "STATUS:ERROR:C:\\<sync-dir>\\<large-file-dir1>\\<large-file-dir2>\\<large-file>" to QLocalSocket(0xa6889e0)
  1. Web server error log:
    __
  2. Server logfile: ownCloud log (data/owncloud.log):
    __
bug

Most helpful comment

Right, that issue was fixed 2.5.1 was for a rename.
But in this case, this is the same, but for upload.
PR #6907 should fix it.

All 5 comments

Sounds like https://github.com/owncloud/client/issues/6824 , but this should be fixed in the 2.5.1. @ogoffart for help 馃毃

Right, that issue was fixed 2.5.1 was for a rename.
But in this case, this is the same, but for upload.
PR #6907 should fix it.

@mirekys The 2.5.2 rc2 should have the fix for this.
Please test.. https://download.owncloud.com/desktop/testing/ownCloud-2.5.2.11335.11186-rc2.en-US.msi

tested

2.5.2 rc2 is tested and looks to be working without problem
screenshot from 2019-01-18 10-47-13

@lazawan thank you
@mirekys Please report if with your setup there is any issue still

Was this page helpful?
0 / 5 - 0 ratings