Commit graph

112 commits

Author SHA1 Message Date
Vincent Petry
ab5149f5df Allow specifying protocol in ext storage OC config
Allow specifying a protocol in the host field when mounting another
ownCloud instance. Note that this was already possible with the WebDAV
config but this bug made it inconsistent.
2014-10-13 17:15:58 +02:00
Jörn Friedrich Dreyer
3427976bb6 strict comparison 2014-10-08 18:49:55 +02:00
Jörn Friedrich Dreyer
aa3ad898a9 fix amazon s3 issues
folder size and mtime is always unknown in s3

more s3 fixes

make rescanDelay of root dir configurable, add on the fly update of legacy storage ids, !isset -> empty when checking strings

reduce number of http calls on remove and rmdir

fix typo
2014-10-08 18:49:47 +02:00
Lukas Reschke
6eeb905871 Do only follow HTTP and HTTPS redirects
We do not want to follow redirects to other protocols since they might allow an adversary to bypass network restrictions. (i.e. a redirect to ftp:// might be used to access files of a FTP server which might be in a secure zone and not be reachable from the net but from the ownCloud server)

Get final redirect manually using get_headers()

Migrate to HTTPHelper class and add unit tests
2014-09-22 20:02:32 +02:00
Lukas Reschke
33c0d2f743 Fix mapping of relative paths 2014-09-17 11:38:10 +02:00
Robin Appelman
2f22e67570 Also check if the file itself is updatable 2014-09-17 11:35:16 +02:00
Robin Appelman
d25a9a118f Check if a folder is deletable before we try to recursively delete it 2014-09-17 11:35:16 +02:00
Robin Appelman
ab79caf29b Check if the parent is writable to check if a file is deletable 2014-09-17 11:35:16 +02:00
Morris Jobke
b3b3354809 move to public namespace 2014-08-19 14:05:08 +02:00
Stephan Peijnik
2df52e54d7 Fix STORAGE_* constants usage by moving those constants into \OC\Files\Filesystem.
As constants not defined within a class cannot be automatically found by the
autoloader moving those constants into a class makes them accessible to
code which uses them.

Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>
2014-08-19 13:55:35 +02:00
Morris Jobke
c6bf51c457 Close open file handles in files library
ref #10392
2014-08-13 15:48:32 +02:00
Robin Appelman
174805f5e3 Merge pull request #9762 from owncloud/owner-public
Return the proper owner for home storages
2014-08-12 14:29:17 +02:00
Clark Tomlinson
26af116fcd Removing unnecessary switch statements in fopen methods. 2014-07-31 09:34:27 -04:00
Robin Appelman
e9de20952a Return the proper owner for home storages 2014-07-21 16:59:59 +02:00
Vincent Petry
3df7a83c72 Merge pull request #9406 from philfry/master
silently discard the response body, needed for apache/mod_dav and maybe ...
2014-07-21 12:22:06 +02:00
Robin Appelman
5a0397eb5e Fix renaming files in the root folder of a MappedLocal storage 2014-07-16 21:24:18 +02:00
Tigran Mkrtchyan
03f422153d files: storage: rename should check parent directories of old and new files
as described by POSIX.1-2008
(see http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html)

Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
2014-07-10 14:58:59 +02:00
Philippe Kueck
ef114b6594 silently discard the response body, needed for apache/mod_dav and maybe other dav servers which return an html body 2014-07-03 12:04:38 +02:00
Vincent Petry
ed29e7d160 Merge pull request #9329 from owncloud/sharing_check_target
don't move a share mount point into a different mount point
2014-07-02 21:01:03 +02:00
Bjoern Schiessle
735eac6c9d add a explicit interface for the home storage 2014-07-01 17:31:33 +02:00
Robin Appelman
d78a2a9f78 Add StorageNotAvailableException 2014-06-30 15:46:37 +02:00
icewind1991
1a3e698294 Merge pull request #9263 from owncloud/remote-share-update
Better detecting of remote changes for external shares
2014-06-27 19:31:18 +02:00
Robin Appelman
db3f0cee4a Fix parsing of webdav permissions 2014-06-27 17:28:56 +02:00
Robin Appelman
6f5d5b9a30 Also check for updated permissions for webdav storages 2014-06-27 17:27:47 +02:00
Robin Appelman
5b8c2ac750 Use the etag to check for updates in webdav storages where available 2014-06-27 17:10:46 +02:00
Vincent Petry
fd8b5680dd Merge pull request #8383 from owncloud/object_storage
Object storage
2014-06-27 16:53:03 +02:00
Jörn Friedrich Dreyer
ab93f1949d update hasUpdated description, overwrtie testStat for objectstore test 2014-06-27 12:14:31 +02:00
Thomas Müller
171475b95a fix autoloader 2014-06-27 08:52:40 +02:00
Thomas Müller
c745240543 Move \OC\Files\Storage\DAV to core in order to reduce inter-app dependencies 2014-06-27 08:52:28 +02:00
Robin Appelman
87e311b996 Fix storage being passed to cache/watcher and scanner when using storage wrappers 2014-06-14 10:14:08 +02:00
Thomas Müller
ad4ec414c9 use system function to recursive remove the directory used by temporary storage 2014-06-06 09:29:31 +02:00
Jörn Friedrich Dreyer
f1bf06f8cf Merge pull request #8884 from owncloud/move-flock-to-app
remove file locking - code will continue to live in it's own app
2014-06-05 10:54:24 +02:00
Thomas Müller
da3974bcb2 - drop permissions table and related code
- the file/folder's permission is now stored in the file cache
- BackGroundWatcher has been removed - this has meanwhile be replaced by occ files:scan which can be executed in a cron jobs
- increase version to trigger database migration
2014-06-05 08:22:01 +02:00
Thomas Müller
ec7225da66 remove file locking - code will continue to live in it's own app 2014-06-04 20:11:54 +02:00
Bjoern Schiessle
48eb0515e9 only lock if unlink is called for a file 2014-06-04 07:55:46 +02:00
Bjoern Schiessle
ab6680e9ab name the storage wrapper to make sure that we don't apply the wrapper multiple times 2014-06-04 07:55:46 +02:00
ringmaster
54865815f5 Move Lock to private namespace, add interface. Update PHPDoc. 2014-06-04 07:55:45 +02:00
ringmaster
392a1b6662 Removed unused vars/declarations, update PHPDoc. 2014-06-04 07:55:45 +02:00
ringmaster
896bc526e6 Remove unused methods. 2014-06-04 07:55:44 +02:00
ringmaster
f9dbdb7c5c Add actual locking and log changes necessary for debugging. 2014-06-04 07:55:44 +02:00
ringmaster
dc1e3620d2 Continued flock work. 2014-06-04 07:55:44 +02:00
ringmaster
5365ae416e flock changes. Work in progress. 2014-06-04 07:55:44 +02:00
Thomas Müller
31ad1cbdd8 Merge pull request #5365 from owncloud/filesize-improvements-32bit
Add LargeFileHelper / Add CURL filesize workaround / Fix some 32-bit filesize issues
2014-05-30 16:13:48 +02:00
Andreas Fischer
0417e52134 Increase file size limit from 2 GiB to 4 GiB when workarounds are unavailable. 2014-05-29 16:26:02 +02:00
Andreas Fischer
fb7ec2bb22 Only call $this->filesize() for files. 2014-05-29 16:26:01 +02:00
Andreas Fischer
c8fa1fd687 Refactor Large File handling code. 2014-05-29 16:26:01 +02:00
Andreas Fischer
3f8f8027d2 Cast to numeric instead of float, i.e. use an integer if possible. 2014-05-29 16:17:13 +02:00
Andreas Fischer
6195f13bda Use CURL to get filesize on 32bit systems. 2014-05-29 16:17:13 +02:00
Robin Appelman
998fa2d9be Pass any methods custom to specific storage implementations to the wrapped storage 2014-05-29 16:13:05 +02:00
Robin Appelman
8c5521fdfc Add $storage->instanceOfStorage to handle instanceof for storage wrappers 2014-05-29 13:45:50 +02:00