Commit Graph

2231 Commits

Author SHA1 Message Date
Joas Schilling 0b8335ff2f Make the JobList test more robust by sorting the result of getAll before comparison 2015-11-19 09:25:34 +01:00
Thomas Müller 8db9c49cda Merge pull request #20551 from owncloud/notification-fix-tests
Notification - Add tests for the "return $this" and fix it on the new method
2015-11-18 09:12:27 +01:00
Thomas Müller 74ce6d29e1 Merge pull request #20544 from owncloud/move-index-to-appframework
Move index.php from files to AppFramework
2015-11-17 12:49:38 +01:00
Joas Schilling 2fde6a77d7 Add tests for the "return $this" and fix it on the new method 2015-11-17 09:26:13 +01:00
Thomas Müller 705d208a8a Merge pull request #20539 from owncloud/notification-api-adjustment
Notification api update
2015-11-17 08:39:06 +01:00
Lukas Reschke daa388ce8d Move index.php from files to AppFramework
1. Allows it to use the more secure CSP rules of the AppFramework.
2. Adds some unit tests.
2015-11-16 21:10:11 +01:00
Joas Schilling 40d5d55124 Remove the icon for now 2015-11-16 16:17:23 +01:00
Joas Schilling 1666af89c2 Add "is primary action" to actions 2015-11-16 16:14:52 +01:00
Roeland Jago Douma 1e9fc33212 [Share2.0] OCS Share API getShare uses new code 2015-11-16 13:32:28 +01:00
Christian Schnidrig d0464bf772 enable microseconds in log timestamps 2015-11-12 10:33:20 +01:00
Robin Appelman 20cad09f7f Add tests for FileInfo owner 2015-11-10 11:06:48 +01:00
Robin Appelman 960c8cb5bc Merge pull request #16604 from owncloud/cache-escape-like
escape like parameter in cache operations
2015-11-10 09:45:00 +01:00
Roeland Jago Douma 87e3402ef5 Fix autoloader unit test output
Removed leftover print statement
2015-11-09 15:54:40 +01:00
Roeland Jago Douma 0bb5eadf89 [autoloader] Make sure to load construct full paths
This reduces a lot of the autoloader magic and makes sure that we
generate full paths in the autoloader.
2015-11-06 13:36:19 +01:00
Thomas Müller cc4f4f222d Merge pull request #20348 from owncloud/issue-20303-integer-group-names
Make sure that group names are strings not integers
2015-11-06 11:48:40 +01:00
Thomas Müller 8047597a81 Merge pull request #20288 from owncloud/fix_20234
make sure that we update the unencrypted size for the versions
2015-11-06 11:17:17 +01:00
Joas Schilling 292dc553c3 Make sure that group names are strings not integers 2015-11-06 10:40:09 +01:00
Robin Appelman 556fabf15d Add test for special character during move 2015-11-05 16:29:38 +01:00
Roeland Jago Douma 532b8a1ad0 Fix oracle 2015-11-05 15:59:09 +01:00
Roeland Jago Douma 0be05fdddd Add unshare hooks 2015-11-05 15:59:09 +01:00
Roeland Jago Douma 6624fa212a The new sharing code now handles deletion
OCS -> ShareManager -> DefaultShareProvider
2015-11-05 15:59:09 +01:00
Arthur Schiwon 51ead4e59b subadmin methods should not return any null user or group 2015-11-05 11:50:57 +01:00
Björn Schießle 6d0a324144 make sure that we update the unencrypted size for the versions 2015-11-04 10:59:05 +01:00
Thomas Müller 73d9699be9 Merge pull request #20135 from owncloud/check-if-null-subadmin
Drop OC_SubAdmin and replace usages
2015-10-29 17:07:45 +01:00
Thomas Müller 530f7229e7 Merge pull request #19869 from owncloud/cache-adjustcurrentmtimeonrename
On rename, also refresh storage_mtime of the target file
2015-10-29 11:57:00 +01:00
Lukas Reschke c6f6a8758b Drop OC_SubAdmin and replace usages 2015-10-29 11:31:18 +01:00
Joas Schilling 6043f0afdb Use the method 2015-10-29 09:26:26 +01:00
Joas Schilling e5a7e3124a Add a repair step that checks for group membership on shares 2015-10-29 09:26:26 +01:00
Joas Schilling ca2fd30073 Remove shares where the parent does not exist anymore 2015-10-29 09:26:26 +01:00
Vincent Petry f355d4e51a Fix locking unit tests due to filemtime addition 2015-10-26 15:41:23 +01:00
Vincent Petry b900782513 Also adjust storage_mtime of target after rename
Some storages like Dropbox change their mtime on rename...
2015-10-26 15:41:23 +01:00
Lukas Reschke 13e817e901 Throw exception on `getPath` if file does not exist
Currently the `getPath` methods returned `NULL` in case when a file with the specified ID does not exist. This however mandates that developers are checking for the `NULL` case and if they do not the door for bugs with all kind of impact is widely opened.

This is especially harmful if used in context with Views where the final result is limited based on the result of `getPath`, if `getPath` returns `NULL` PHP type juggles this to an empty string resulting in all possible kind of bugs.

While one could argue that this is a misusage of the API the fact is that it is very often misused and an exception will trigger an immediate stop of execution as well as log this behaviour and show a pretty error page.

I also adjusted some usages where I believe that we need to catch these errors, in most cases this is though simply an error that should hard-fail.
2015-10-25 17:58:21 +01:00
Lukas Reschke 8133d46620 Remove dependency on ICrypto + use XOR 2015-10-21 17:33:41 +02:00
Roeland Jago Douma 0e9ab13943 New \OC\SubAdmin class
* DI
* Tests
* moved OC_SubAdmin to legacy
* Added to private OC\GroupManager
2015-10-21 11:32:38 +02:00
Thomas Müller cf9b8fc182 Merge pull request #18184 from owncloud/ocs-merge-headers
Merge headers of ocs results
2015-10-21 10:36:37 +02:00
Jörn Friedrich Dreyer 2895c91291 Merge pull request #17641 from owncloud/fix_objectstore_rename
don't move files in cache twice, fixes renaming for objectstores
2015-10-19 17:18:57 +02:00
Robin Appelman 9c5337ca3e Merge pull request #19833 from owncloud/fix_view_rmdir
Removemount expects absolutePath
2015-10-19 16:22:42 +02:00
Robin Appelman ef179331bb Add tests for double cache rename 2015-10-16 21:41:51 +02:00
Robin Appelman a87368acb9 Skip checkupdate test for swift 2015-10-16 21:41:51 +02:00
Roeland Jago Douma 8fdb12f8fb Check for error when resharing 2015-10-16 20:43:17 +02:00
Roeland Jago Douma 9e86d71cc5 When sharing with the owner show the path
The error message should contain the path that is being shared not the
numeric id.
2015-10-16 20:43:17 +02:00
Roeland Jago Douma d8798877df Added test for rmdir on moveablemount 2015-10-16 16:51:44 +02:00
Thomas Müller 8fa59033ac Fix uni tests 2015-10-16 13:17:12 +02:00
Thomas Müller f2889dc6e4 Consolidate webdav code - move all to one app 2015-10-16 13:17:12 +02:00
Lukas Reschke e0d6bd5b6d Run test only when idn is available
IDN is not installed on all machines making the unit test execution fail on those without. Let's make IDN thus a pre-requirement for the text execution.
2015-10-16 11:02:10 +02:00
Joas Schilling d904a09a04 The constant is now deprecated 2015-10-14 15:29:38 +02:00
Thomas Müller 28d6da8158 Merge pull request #19738 from owncloud/proppatch-lastmodified
Fix mtime PROPPATCH to be "lastmodified" instead of "getlastmodified"
2015-10-14 12:49:33 +02:00
Thomas Müller bfac6c5eb7 Merge pull request #19730 from owncloud/fix_17560
Squash collection shares
2015-10-14 12:38:16 +02:00
Vincent Petry 02513f8d04 Fix mtime PROPPATCH to be "lastmodified" instead of "getlastmodified"
Fix regression that makes PROPPATCH of mtime work like it did in OC <=
8.0.
The PROPPATCH must be done on the "lastmodified" property.
The "getlastmodified" now return 403 again.
2015-10-13 12:51:21 +02:00
Thomas Müller 3891cd9068 Merge pull request #19677 from owncloud/silently-fail-app-upgrade-exceptions-master
Silently fail app upgrade exceptions
2015-10-13 11:04:02 +02:00
Roeland Jago Douma 06aaa059d1 Squash collection shares
If folder1 is shared to user2 and user3. And folder1/folder2 is shared
to user4 and user5 then getting all the users with access to
folder1/folder2 should only list user2 and user 3 once.

Previously this was done twice since we request the info two times.

This fix makes sure that we only append unique results to the array.

* Added test
2015-10-13 10:05:49 +02:00
Lukas Reschke e03f0542e4 Strip directory from scriptName
`\OCP\IRequest::getScriptName` will also return the directory, so if ownCloud is installed in a subfolder such as `owncloud/` it will resolve to `/owncloud/ocs/v2.php`. This made this check fail and also made it return invalid status codes.
2015-10-12 23:39:16 +02:00
Thomas Müller 64a8d01694 Merge pull request #19683 from owncloud/repair-donotrepairfoldermimetypes
Do not update mime types for folders with extension
2015-10-12 15:08:19 +02:00
Bjoern Schiessle 8185eaa6dd also detect files in a .part folder as part file 2015-10-12 13:59:16 +02:00
Thomas Müller 0036c637fc Merge pull request #19657 from owncloud/setup-transport
Setup sendmail transport
2015-10-12 13:44:26 +02:00
Vincent Petry 8098c06e70 Do not update mime types for folders with extension
Some folders might have an extension like "test.conf".
This fix prevents to overwrite the folder's mime type with another mime
type while running the mimetype repair step.
2015-10-09 18:16:36 +02:00
Thomas Müller 4cb5970947 Always pass in ILogger 2015-10-09 14:08:22 +02:00
Jörn Friedrich Dreyer c8640cdcb0 adjust filesystem tests to objectstore 2015-10-09 12:35:37 +02:00
Thomas Müller 020bb33150 Merge pull request #19034 from owncloud/http-request-warning
Prevent warning decoding content
2015-10-08 21:51:47 +02:00
Lukas Reschke 18394205c2 Setup sendmail transport
Replaces https://github.com/owncloud/core/pull/19047 and fixes https://github.com/owncloud/enterprise/issues/854  and https://github.com/owncloud/core/issues/19110
2015-10-08 16:48:18 +02:00
Thomas Müller 17ffa4a244 Merge pull request #19414 from owncloud/swift_primary_storage_tests
Swift primary storage tests
2015-10-08 14:08:56 +02:00
Thomas Müller 2fda4e38e2 Merge pull request #19546 from owncloud/fix-search-for-node-api
Fix search operations for the Node API
2015-10-08 13:17:26 +02:00
Roeland Jago Douma 1ee56c702d [WEBDAV] check if delete of source is allowed on move
Fixes #5251

If we perform a move we need to make sure first that the source can be
deleted. Else the dest might be cleared but the move will fail later.

* Added unit tests

Eventually we need more and better checking here.
2015-10-07 11:58:16 +02:00
Jörn Friedrich Dreyer 5646e39248 test objectstore with ceph docker
use default config for swift primary storage test config

allow testsuite to complete

fix timeout, script cleanup, enable debug for now

use btrfs loopback device, requires privileged container and absolute path

throw exception when storage has problems

debug by echo ...

sleep more, more debug
2015-10-06 16:27:25 +02:00
Robin Appelman e28a2ff888 Add unit test for searching in storage root 2015-10-06 15:54:17 +02:00
Lukas Reschke 80a232da6a Add \OCP\IRequest::getHttpProtocol
Only allow valid HTTP protocols.

Ref https://github.com/owncloud/core/pull/19537#discussion_r41252333 + https://github.com/owncloud/security-tracker/issues/119
2015-10-06 14:18:46 +02:00
Thomas Müller da640adf68 Merge pull request #19577 from owncloud/share-donotreturnentrieswhenusernotingroup
Remove invalid share items from result when missing group membership
2015-10-06 09:24:22 +02:00
Vincent Petry 1c7244c120 Remove invalid share items from result when missing group membership
Group shares usually have subshare entries for every user. In some
situations it can happen that the user was removed from the group but
the subshare entries still exist.

This fix makes sure that such subshare entries are not returned any more
as the user isn't in the group any more.
2015-10-05 17:21:34 +02:00
Joas Schilling ac5b3161e4 Add a unit test for "share a file inside a folder that is already shared" 2015-10-05 12:36:16 +02:00
Thomas Müller 34951efed6 Merge pull request #19574 from owncloud/fix-sharing-tests-assuming-empty-share-table
Clear the shares after the test like storages and files
2015-10-05 11:00:34 +02:00
Thomas Müller 56c35da8d5 Merge pull request #19416 from owncloud/node-hook-connector
pass view hooks trough to the node hooks
2015-10-05 10:25:04 +02:00
Joas Schilling 42b29e39c1 Clear the shares after the test like storages and files 2015-10-05 10:13:45 +02:00
Thomas Müller ff89824135 Merge pull request #19272 from owncloud/mimetypes-enhanced
Introduce a few new mimetypes for code, fix recursive mimetype aliases
2015-10-02 17:50:34 +02:00
Robin Appelman 8bdffb5ed3 Merge pull request #19525 from owncloud/share-preventmovemountpointintosharedfolder
Prevent moving mount point into already shared folder (outgoing)
2015-10-02 16:50:38 +02:00
Vincent Petry 64ca00925b Prevent moving mount point into already shared folder (outgoing)
It is already not allowed to share a folder containing mount points /
incoming shares.

This fixes an issue that made it possible to bypass the check by moving
the incoming share mount point into an existing outgoing share folder.
2015-10-02 16:14:42 +02:00
Roeland Jago Douma c80dd82fe4 Added mimetype repair step
* Version number increased
2015-10-02 16:06:56 +02:00
Morris Jobke 6b53f7c40e [l10n] remove unused static methods 2015-10-02 12:51:45 +02:00
Thomas Müller 8944cb539e Merge pull request #19510 from owncloud/json-grouplist-sharing-exclude
save excluded groups in json format
2015-10-02 12:14:36 +02:00
Thomas Müller b6591084a1 Merge pull request #19463 from owncloud/fix_18132
encryption: versions should always use the keys of the original file, no need to …
2015-10-01 16:56:28 +02:00
Thomas Müller b2dd5cb616 save excluded groups in json format - fixes #10983 2015-10-01 15:37:55 +02:00
Robin Appelman 1c3e28a73b Add tests 2015-10-01 13:17:22 +02:00
Bjoern Schiessle e7232a848b versions should always use the keys of the original file, no need to create new one 2015-10-01 10:10:19 +02:00
Joas Schilling 8f2600a0ea Also delete all shares before the test, so the count matches 2015-10-01 08:32:24 +02:00
Vincent Petry 6e104bc933 Repair step to remove bogus expiration dates from non-link shares 2015-10-01 08:27:12 +02:00
Thomas Müller ff75652cb7 Merge pull request #19299 from owncloud/fixgetRawPathInfo
Fix get raw path info, always return a string
2015-09-30 22:17:02 +02:00
Thomas Müller 1d8c10cf63 Merge pull request #19468 from owncloud/fix-36-vs-32-previews
Change small thumbnails to 32 px
2015-09-30 15:47:34 +02:00
Thomas Müller 10978a7a61 Merge pull request #19373 from owncloud/sidebar-preview-cover
Cover both width and height for the sidebar preview
2015-09-30 11:07:18 +02:00
Morris Jobke 1051a3c6f5 Change small thumbnails to 32 px
* fixes #16913
* fixes issues in IE8 where the thumbnail is too big
2015-09-30 10:49:48 +02:00
Individual IT Services fbe43e6a26 cache result of \OCP\Util::needUpgrade()
reduce calls of \OCP\Util::needUpgrade()
where \OCP\Util::needUpgrade() is called we can call as well
self::checkUpgrade and use the cached result
In line 877 the call way unnecessary anyway because of the first part of
the if statement

move caching to \OCP\Util::needUpgrade

renaming variable

fixing testNeedUpgradeCore()

cache result of checkUpgrade() in self::$needUpgrade

reduce calls of \OCP\Util::needUpgrade()
where \OCP\Util::needUpgrade() is called we can call as well
self::checkUpgrade and use the cached result
In line 877 the call way unnecessary anyway because of the first part of
the if statement

move caching to \OCP\Util::needUpgrade

renaming variable

fixing testNeedUpgradeCore()

fix typo in variable name

deleting tabs
2015-09-29 15:34:42 +02:00
Lukas Reschke e735a9915c Add blob: scheme to default CSP policy
Fixes https://github.com/owncloud/core/issues/19438
2015-09-29 14:27:35 +02:00
Robin Appelman f41a38ba15 Cover both width and height for the sidebar preview 2015-09-29 13:07:03 +02:00
Robin Appelman e21a025887 remove unused use 2015-09-28 17:20:44 +02:00
Robin Appelman 1e5a41f008 Add hook connector to connect view and node hooks 2015-09-28 17:18:40 +02:00
Thomas Müller d68079f932 Merge pull request #18548 from owncloud/repair-mimetype-limitversion
Repair mime types only when upgrading from OC 8.0
2015-09-28 12:56:36 +02:00
Robin Appelman b50d1aae56 rename config test to prevent autoloader issue 2015-09-28 10:47:49 +02:00
Thomas Müller 0aaece7de7 Merge pull request #19346 from owncloud/drop-passwords-from-exception-log
Remove passwords from logged exception stack traces
2015-09-25 20:04:01 +02:00
Roeland Jago Douma 9a373cb5bb Do not blindy copy expiration date on reshare
If a file/folder is reshared we should not blindly copy the expiration
date of the parent share. User/Group shares do not have expiration dates
currently, and thus this is always set to null.

Fixes #19119

* Added testcase
2015-09-25 13:06:05 +02:00
Morris Jobke db8e7ce8b9 Remove passwords from logged exception stack traces
* fixed #16318
* create logException in ILogger
* add unit tests
2015-09-24 20:01:30 +02:00
Thomas Müller ebdd6d96ce Merge pull request #19306 from owncloud/app-code-check-version
[App Code Check] add check for version and mandatory fields
2015-09-24 17:38:48 +02:00
Thomas Müller bf4c144c6f Merge pull request #19335 from owncloud/phil-davis-view-typos
Comment typos in tests/lib/files/view.php
2015-09-24 14:54:21 +02:00