Commit Graph

881 Commits

Author SHA1 Message Date
Arthur Schiwon
450de0091a adjust tests accordingly 2014-04-15 17:53:57 +02:00
Lukas Reschke
340089f270 Merge pull request #8059 from owncloud/countUsersInGroup
add optional countUsersInGroup method to group backends
2014-04-14 20:45:12 +02:00
Lukas Reschke
9046f7b2f8 Merge pull request #8178 from owncloud/fix-request-parameters
Correctly process request parameters other than GET or POST, dont use gl...
2014-04-14 20:42:26 +02:00
Thomas Tanghus
51e47319ef White-list known secure mime types. Refs. #8184 2014-04-14 17:17:50 +02:00
Thomas Müller
8df19c4379 Merge pull request #8019 from owncloud/thumbnail_fixes
Thumbnail fixes
2014-04-14 16:23:03 +02:00
Lukas Reschke
b04d95b116 Remove uneeded usages of nosniff 2014-04-13 12:48:16 +02:00
Bernhard Posselt
62cce982bb default to GET request when no method is set to fix unittests, also set parsed json parameters on the post attribute 2014-04-12 16:17:49 +02:00
Thomas Müller
26a89e369e Merge pull request #8137 from owncloud/routeing-requirements
add requirements to routing
2014-04-10 16:23:01 +02:00
Vincent Petry
6cc578d1a7 Merge pull request #8018 from owncloud/ocs_result_success_is_100
OC_OCS_Result Class, Only accept 100 code as success
2014-04-10 13:03:10 +02:00
Bernhard Posselt
70c88027db add requirements to routing 2014-04-09 21:57:32 +02:00
Thomas Müller
73ac3d0fcd Merge pull request #7643 from owncloud/chainable_response
Chainable Response in AppFramework
2014-04-08 22:42:43 +02:00
Thomas Müller
a4fc92b05b class Test_Config is already declared 2014-04-08 14:15:33 +02:00
Arthur Schiwon
9597f41904 add group tests 2014-04-08 12:32:30 +02:00
Thomas Müller
240d1ae6b9 unit test testSetAppValueIfSetToNull() added 2014-04-07 20:56:43 +02:00
Fabian Henze
1245ff8f31 Add unit tests for OC_Helper::phpFileSize function 2014-04-07 15:31:34 +02:00
Thomas Müller
ccf1287fbf adding unit test for cache mechanism 2014-04-04 16:21:50 +02:00
Thomas Müller
f029312e5b fixing typos/spellings 2014-04-04 11:37:47 +02:00
Thomas Müller
20f26068e7 Merge pull request #7476 from owncloud/type-hinting
Type hinting
2014-04-03 20:02:27 +02:00
tomneedham
b00592ade5 Fix test case for api response code 2014-04-03 14:47:55 +00:00
Thomas Müller
a2efdb8722 Merge pull request #7970 from owncloud/webdav-upload-hash
Fix uploading files containing a # in the path for webdav
2014-04-03 16:09:44 +02:00
Vincent Petry
4cc70ec39d Merge pull request #7979 from owncloud/core-fixfilegetcontentsloop
Correctly read the full stream in file_get_contents
2014-04-02 10:55:50 +02:00
Thomas Müller
82d1ea240e Merge pull request #7884 from owncloud/use-idn_to_ascii-if-available
idn_to_ascii is only used if available
2014-04-01 22:51:23 +02:00
Vincent Petry
d6ce45fe61 Correctly read the full stream in file_get_contents
When using user-defined stream wrappers, PHP will
return a maximum of 8192 bytes even if more was
requested.

This fix uses stream_get_contents to make sure the full stream is read
and not only the first 8 KB.

Added unit test with a bigger test file to cover this case.
2014-04-01 10:07:16 +02:00
Bart Visscher
6b061c236d Merge branch 'master' into type-hinting
Conflicts:
	lib/private/image.php
	lib/private/l10n.php
	lib/private/request.php
	lib/private/share/mailnotifications.php
	lib/private/template/base.php
2014-03-31 21:38:54 +02:00
Robin Appelman
76c63a5760 Fix uploading files containing a # in the path for webdav 2014-03-31 17:00:32 +02:00
Thomas Müller
70db348475 Merge pull request #7824 from owncloud/hash-parameter-order
Fix parameter order for Storage\Local::hash
2014-03-28 13:06:07 +01:00
Vincent Petry
d0012e729a Merge pull request #7879 from owncloud/sharing_cleanup_public_api
sharing api cleanup, first step
2014-03-28 12:23:11 +01:00
Vincent Petry
5068c57845 Merge pull request #7613 from owncloud/fix_urlGenerator2
Add \OC::$WEBROOT to URLGenerator::getAbsoluteURL()
2014-03-28 12:12:49 +01:00
Vincent Petry
040f430f0c Merge pull request #7829 from owncloud/cachefolderlocation
Cache folder is now configurable
2014-03-28 12:08:38 +01:00
Robin Appelman
371a924c92 merge master into webdav-injection 2014-03-26 14:26:07 +01:00
Thomas Müller
83b4bcfdbf idn_to_ascii is only used if available 2014-03-26 11:17:23 +01:00
Thomas Müller
1ae10b9da3 Merge pull request #7420 from owncloud/cachehooks-first
Manually triger the filecache update hooks before any other hook
2014-03-25 22:41:09 +01:00
Thomas Müller
bbc2e37259 Merge pull request #7477 from owncloud/foldersize-reuse
Allow re-using already known fileinfo when calculating folder sizes
2014-03-25 22:33:24 +01:00
Bjoern Schiessle
bc0292c16d always return an array 2014-03-25 17:47:24 +01:00
Vincent Petry
1e39719926 Added unit tests for external cache folder 2014-03-24 14:32:04 +01:00
Thomas Müller
fb7f3008d3 idn have to be converted before being used 2014-03-24 13:46:31 +01:00
Robin Appelman
fffe330bbc Fix parameter order for Storage\Local::hash 2014-03-20 15:32:12 +01:00
Vincent Petry
316a22b463 Merge pull request #7808 from owncloud/quota-usequotaevenwhenfreespaceunknown
Still return quota value when free space is unknown
2014-03-20 15:29:14 +01:00
Vincent Petry
36c0f08ec0 Merge pull request #7732 from owncloud/datafolderexistence
Added .ocdata file to check for data folder validity
2014-03-20 11:31:28 +01:00
Vincent Petry
66bc0f0848 Still return quota value when free space is unknown
Fixed the quota storage wrapper to correctly return the quota value when
the free space is not known (which usually happens when the disk_free_space
function is disabled)
2014-03-19 19:07:11 +01:00
Thomas Müller
756bbe8786 Merge pull request #7649 from owncloud/routing-public
Move routing classes to an interface and expose it in the public api
2014-03-17 21:07:05 +01:00
icewind1991
5c72b526a3 Merge pull request #7760 from owncloud/core-roundbytes
Correctly round bytes when converted from human readable format
2014-03-17 15:21:57 +01:00
Vincent Petry
145db370d1 Correctly round bytes when converted from human readable format
Instead of leave two decimal places which is confusing, round the byte
values correctly to the closest byte.
2014-03-17 12:15:12 +01:00
Thomas Müller
cd038604d3 unit tests for specific image type output added 2014-03-17 08:40:59 +01:00
Vincent Petry
3c46dcd7dd Added .ocdata file to check for data folder validity
In environments where the data folder is mount from another partition,
it is important to check that the data folder we see is actually the
real one. If the mount failed for some reasons, this fix will make
ownCloud temporarily unavailable instead of causing unpredictable
behavior.
2014-03-14 15:36:35 +01:00
Robin Appelman
eabeedb306 Merge branch 'master' into cachehooks-first 2014-03-13 15:22:00 +01:00
Robin Appelman
d55c7223a9 Merge branch 'master' into foldersize-reuse
Conflicts:
lib/private/files/cache/homecache.php
2014-03-11 13:04:20 +01:00
Vincent Petry
c1cb9ee9b0 Merge pull request #7650 from owncloud/quota-totalspace
Fixed total space display when data size exceeds quota
2014-03-11 12:40:59 +01:00
Vincent Petry
010eef95c0 Fixed total space display when data size exceeds quota
The total space display in the personal page now shows the quota value
instead of used space when used space exceeds the quota (soft quota).
2014-03-10 17:59:14 +01:00
Robin Appelman
8ab7d18a6a Move the router classes to a namespace and expose it with a public interface 2014-03-10 14:04:58 +01:00
Vincent Petry
26513bc17b Merge pull request #7624 from owncloud/enc-encryptedusedspacefix
[master] Fixed used space to be based on unencrypted size
2014-03-10 09:38:24 +01:00
Thomas Tanghus
8f6ea900f2 Chainable Response in AppFramework 2014-03-09 23:01:16 +01:00
Vincent Petry
48d63a6278 Return unencrypted_size of folder when queried
This fixes the "used space" to be based on the unencrypted size, not
encrypted size, to be consistent with how quota/space is handled when
encryption is enabled
2014-03-07 14:59:09 +01:00
Thomas Tanghus
ada8d4e0c9 Fix unit tests 2014-03-07 02:44:34 +01:00
Robin Appelman
84cf40ed82 merge master into webdav-injection 2014-03-06 13:35:06 +01:00
Vincent Petry
c7e204bd36 Added unit tests for serverHost and other related functions 2014-03-06 11:51:17 +01:00
Thomas Tanghus
b54b0b2153 Yet another cleanup 2014-03-05 00:26:06 +01:00
Robin Appelman
5211566205 update test case 2014-03-04 16:36:03 +01:00
Robin Appelman
bb8a7a2230 Remove assert since the root size of the home storage is no longer calculated 2014-03-03 16:48:06 +01:00
Robin Appelman
331fc55e2d Update unit tests to use the new injection 2014-03-03 14:27:24 +01:00
Bart Visscher
35a8dfb2fa More PHPDoc fixes, using scrutinizer patches as hints 2014-02-28 13:53:41 +01:00
Jörn Friedrich Dreyer
2ba6cd4e2b initialize etags of temporary storage 2014-02-27 12:44:07 +01:00
Jörn Friedrich Dreyer
131c12ad8d use assertInternalType for typechecking 2014-02-27 09:51:26 +01:00
Jörn Friedrich Dreyer
39f2f564a9 use assertSame and assertNotSame for etag checks 2014-02-27 09:39:34 +01:00
Robin Appelman
bc49c6be04 Manually triger the filecache update hooks before any other hook 2014-02-26 14:29:13 +01:00
Björn Schießle
6bde602c09 Merge pull request #7292 from owncloud/sharing_tests
fix sharing unit tests
2014-02-21 14:24:51 +01:00
Björn Schießle
9f0fc30251 Merge pull request #7337 from owncloud/test_for_6935
add unit test for \OC\URLGenerator::getAbsoluteURL
2014-02-21 13:45:49 +01:00
Bjoern Schiessle
cf7ef0d356 fix sharing unit tests 2014-02-21 13:36:00 +01:00
Robin Appelman
2293563488 Remove unit tests which causes the filesystem tests to fail 2014-02-21 10:02:03 +01:00
Bjoern Schiessle
1ae6e9ec21 add unit test for \OC\URLGenerator::getAbsoluteURL to verify #6935 2014-02-20 19:06:42 +01:00
Thomas Müller
ec45a3c0e2 Merge pull request #6962 from owncloud/quota-space-root
Allow passing a root folder to get the used space from in the quota wrapper
2014-02-20 16:47:59 +01:00
Lukas Reschke
719f1111b6 Merge pull request #6714 from owncloud/files-newfileinvalidcharsfix
Added extra checks for invalid file chars in newfile.php and newfolder.php
2014-02-20 11:53:58 +01:00
Vincent Petry
b2b35cd335 Fixed ext storage webdav path encoding
- Some WebDAV servers like lighttpd need paths in URLs to be properly
encoded
- Added error log output when curl connection failed
- Added check for 'resourcetype' in case the WebDAV server doesn't
  support/return it
- Fixed touch() to return false if the server doesn't implement
  PROPPATCH
- Added optional delay in WebDAV unit tests to use when testing against
  lighttpd's WebDAV
2014-02-19 18:34:08 +01:00
Morris Jobke
bcad6e641a Merge pull request #7274 from owncloud/scrutinizer-patch-1
Scrutinizer Auto-Fixes
2014-02-19 11:51:04 +01:00
icewind1991
2d5ab1a5c4 Merge pull request #7260 from owncloud/watcher-policy
Allow setting the frequency of which the file watcher checks for updates
2014-02-19 11:17:27 +01:00
Robin Appelman
eea1abae20 add unit tests for watcher policies 2014-02-19 09:52:51 +01:00
Scrutinizer Auto-Fixer
adaee6a5a1 Scrutinizer Auto-Fixes
This patch was automatically generated as part of the following inspection:
https://scrutinizer-ci.com/g/owncloud/core/inspections/cdfecc4e-a37e-4233-8025-f0d7252a8720

Enabled analysis tools:
 - PHP Analyzer
 - JSHint
 - PHP Copy/Paste Detector
 - PHP PDepend
2014-02-19 09:31:54 +01:00
icewind1991
3cc7228c7c Merge pull request #7253 from owncloud/preferences-caching
Add caching to OC\Preferences
2014-02-18 18:17:58 +01:00
Vincent Petry
bd71a1b7b6 Added file name check in webdav connector
- added file name check for the put, rename and setNames() methods which
  throw a "Bad Request" whenever invalid characters are used
- replaced \OC\Filesystem usage with $this->getFS() to be able to write
  unit tests
2014-02-18 17:54:32 +01:00
Vincent Petry
797e0a614c Added extra checks for invalid file chars in newfile.php and newfolder.php
- added PHP utility function to check for file name validity
- fixes issue where a user can create a file called ".." from the files UI
- added extra checks to make sure newfile.php and newfolder.php also
  check for invalid characters
2014-02-18 17:54:32 +01:00
Tom Needham
a573fe7d76 Merge pull request #6650 from owncloud/migration_unit_tests
User migration fix, and basic unit test
2014-02-18 17:35:49 +01:00
Lukas Reschke
3b1083f46e Merge pull request #7176 from owncloud/style
Some style fixes
2014-02-18 17:30:26 +01:00
tomneedham
589a7b220b Fix poor spelling 2014-02-18 16:23:16 +00:00
Robin Appelman
2166683e3b Allow setting the frequency of which the file watcher checks for updates 2014-02-18 16:34:25 +01:00
Robin Appelman
b6f44e9a1d Add caching to OC\Preferences 2014-02-18 11:21:39 +01:00
tomneedham
a4b6d66703 Merge branch 'master' into migration_unit_tests 2014-02-17 11:03:57 +00:00
tomneedham
049e03c2b9 Finish basic testing of user export 2014-02-17 10:58:27 +00:00
Thomas Müller
750ffa8231 Merge pull request #7156 from owncloud/backgroundjob-public
Add the background job list to the public server container
2014-02-14 23:11:10 +01:00
Robin Appelman
b35f679483 Fix test cases for group manager 2014-02-14 15:07:08 +01:00
Robin Appelman
3b1df29318 sort expected result in tests 2014-02-13 13:56:02 +01:00
Robin Appelman
d6576c640c Add unit tests for JobList 2014-02-12 13:52:13 +01:00
Bart Visscher
addd0fba38 number as number 2014-02-12 09:09:45 +01:00
Robin Appelman
a6399f9cef Add the background job list to the public server container 2014-02-11 14:00:24 +01:00
Robin Appelman
a7c50514ac Merge branch 'master' into convert-oc_appconfig 2014-02-11 13:26:54 +01:00
Arthur Schiwon
72f134cfce intendation 2014-02-11 10:50:10 +01:00
Arthur Schiwon
32afdcbefe Inject logger 2014-02-11 10:49:59 +01:00
Arthur Schiwon
9a39cd3b38 test for share dialoge sorter 2014-02-11 10:49:46 +01:00
Bart Visscher
082abdc620 Merge branch 'master' into migration_unit_tests 2014-02-10 21:32:17 +01:00
Robin Appelman
8ad3fc89be Merge branch 'master' into quota-space-root 2014-02-07 23:29:26 +01:00
Robin Appelman
4cdf83e6d2 Remove the Test_AppConfig_Object tests as they no longer make sense with caching 2014-02-07 14:03:57 +01:00