Commit Graph

10665 Commits

Author SHA1 Message Date
Arthur Schiwon 6af6febad0 php < 5.5 compatible 2015-12-09 16:25:31 +01:00
Thomas Müller d5238b3d3c Don't load commands of apps when in maintenance mode - fixes #20939 2015-12-09 15:15:10 +01:00
Robin Appelman e191953942 Remove all locks after ttl from the db 2015-12-09 14:53:24 +01:00
Robin Appelman e41f7b005d add since 2015-12-09 14:45:08 +01:00
Robin Appelman 693a3c353e ttl for memcache locking backends that support it 2015-12-09 14:41:15 +01:00
Robin Appelman 0a80bf5573 Add interface for memcache backends that support setting ttl on exisiting keys 2015-12-09 14:39:12 +01:00
Arthur Schiwon 249dc4490f improve PHP doc and remove superflous by reference indicator 2015-12-09 14:34:23 +01:00
Arthur Schiwon dec1f1d24a anounce CommentsManager getter in public server interface 2015-12-09 14:34:23 +01:00
Arthur Schiwon 0c1c029571 hardening, add some checks for whitespace-only strings 2015-12-09 14:34:23 +01:00
Arthur Schiwon f9081303b1 fix phpdoc 2015-12-09 14:34:23 +01:00
Arthur Schiwon b44a33f68f fix php doc 2015-12-09 14:34:23 +01:00
Arthur Schiwon 9a440c06b0 OC not oc 2015-12-09 14:34:23 +01:00
Arthur Schiwon 9dc4171830 parameter checks for setting actor and object to happen only in one place 2015-12-09 14:34:23 +01:00
Arthur Schiwon 4273689e9f fix usage of empty 2015-12-09 14:34:23 +01:00
Arthur Schiwon e3dbc3d40c different strategy in cleaning up after user was deleted
we do not listen to deletion hooks anymore, because there is no guarantee that they
will be heard - requires that something fetches the CommentsManager first.

Instead, in the user deletion routine the clean up method will be called directly. Same way
as it happens for files, group memberships, config values.
2015-12-09 14:34:23 +01:00
Arthur Schiwon 2ce2de0ae5 add icommentsmanger and icomment implementation
register CommentsManager service, allow override, document in config.sample.php

don't insert autoincrement ids in tests, because of dislikes from oracle and pgsql

specify timezone in null date

only accepts strings for ID parameter that can be converted to int

replace forgotten hardcoded IDs in tests

react on deleted users

react on file deletion

Postgresql compatibility

lastInsertId needs *PREFIX* with the table name

do not listen for file deletion, because it is not reliable (trashbin, external storages)

add runtime cache for comments
2015-12-09 14:34:23 +01:00
Thomas Müller 04f4565fcd Merge pull request #21060 from owncloud/support-for-read-only-config-dir
Add support for read only config dir
2015-12-09 14:32:00 +01:00
Thomas Müller 5c95939bf3 Merge pull request #21061 from owncloud/fix-oracle-last-insert-id-test
Fix the last insert id test by changing to an autoincremen…
2015-12-09 11:53:43 +01:00
Thomas Müller eb14c9dc1e Merge pull request #21056 from owncloud/check-return
Verify return type
2015-12-09 11:29:25 +01:00
Thomas Müller 74e7fb1438 Merge pull request #21055 from owncloud/fix-php-docs-for-console
Fix PHPDoc and check if path does exists
2015-12-09 11:28:53 +01:00
Joas Schilling bef6344b27 Do not quote the table name for lastInsertId() 2015-12-09 11:09:02 +01:00
Thomas Müller bb8dbc291b Merge pull request #21005 from owncloud/verify_password_before_unshare
The ajax code path unshares a link share when updating the password
2015-12-09 10:05:20 +01:00
Thomas Müller bc744ff6de Merge pull request #21038 from owncloud/share-computesharepermissions-notstore
Fix (re)share permission checks in a few code paths
2015-12-09 10:04:56 +01:00
Thomas Müller 6ba22f0243 Merge pull request #21043 from owncloud/add-php-doc
Add type description
2015-12-09 10:04:30 +01:00
Lukas Reschke b50987165e Add support for read only config dir
We already support the `config_is_read_only` for the config file itself. However not for the whole directory (which is a bug).

This unifies the check in the checkServer routine with the one in base.php. Now one can enable a read only config folder so that ownCloud is not allowed to overwrite it's own source code.

To test this set the whole config folder to read only, clear your session, refresh, see it fails, add the new code, refresh, see it works. Also verify that setup still works fine. (obviously setup does not work with a read only config Also verify that setup still works fine. (obviously setup does not work with a read only config))

Fixes https://github.com/owncloud/core/issues/14455
2015-12-09 08:54:11 +01:00
Jenkins for ownCloud dda9525c4b [tx-robot] updated from transifex 2015-12-09 01:55:14 -05:00
Lukas Reschke 61da3d530d Verify return type
Can also be null. Silences another security warning...
2015-12-09 07:32:19 +01:00
Lukas Reschke 11e98e2de6 Fix PHPDoc and check if path does exists
Mutes another security warning of some static scanners.
2015-12-09 06:57:24 +01:00
Vincent Petry d0cca6c3ad Add explicit check for groups excluded from sharing
Since isSharable() doesn't do the check for groups excluded from
sharing, adding an explicit check in the sharing code.
2015-12-08 16:48:33 +01:00
Lukas Reschke 7c45eaa70b Add type description
Allows IDEs and static code analyzers. Would have saved me some minutes today :)
2015-12-08 15:20:54 +01:00
Thomas Müller 49095fa4bb Merge pull request #21031 from owncloud/sanitize-findAppInDirectories
Sanitize the appId passed to `findAppInDirectories`
2015-12-08 13:52:04 +01:00
Thomas Müller 45fe8271ab Merge pull request #21030 from owncloud/querybuilder-new-features
Querybuilder new features
2015-12-08 13:51:45 +01:00
Thomas Müller 85409b6701 Merge pull request #20786 from owncloud/systemtags-dav
DAV endpoint for system tags
2015-12-08 13:51:25 +01:00
Vincent Petry 6e4006d139 Add reshare permission checks
Added in isSharable() in incoming remote share.
Added in isSharable() in regular incoming share.
Added in FileInfo to make sure the proper attributes are returned to the
clients.
2015-12-08 13:13:26 +01:00
Vincent Petry e241d26316 Compute share permissions in the view
The share permissions are now computed in the View/FileInfo instead of
storing them directly/permanently on the storage
2015-12-08 13:04:22 +01:00
Joas Schilling 9f98849306 Add a method to the get "to use" table and column name 2015-12-08 11:04:28 +01:00
Thomas Müller fe8dc0bd5e Merge pull request #21022 from owncloud/get-rid-of-by-reference
Get rid of by reference
2015-12-08 11:04:25 +01:00
Lukas Reschke 715f89a9d9 Sanitize the appId passed to `findAppInDirectories`
Would have prevented quite some security bugs in the past. Nice hardening for now.
2015-12-08 10:03:22 +01:00
Joas Schilling a3391248e4 Add select distinct to the query builder 2015-12-08 09:49:21 +01:00
Joas Schilling f2c7acb3c0 Allow getting the last insert id without much hassle 2015-12-08 09:40:20 +01:00
Lukas Reschke 4b293dffe5 Use \OCP\Util::sanitizeHTML instead of \OC_Util::sanitizeHTML 2015-12-08 08:56:47 +01:00
Lukas Reschke 70c228a7cc Get rid of passing a reference
Fixes https://github.com/owncloud/core/issues/14643
2015-12-08 08:56:46 +01:00
Lukas Reschke 8289943a0f Do not trust casting 2015-12-08 08:50:00 +01:00
Lukas Reschke 451ba4ddaa Remove unused repair steps
These ones are not necessary anymore for the new major release.
2015-12-08 08:46:41 +01:00
Lukas Reschke 6ea7410041 Remove legacy check
This one is not required anymore as we have the RepairConfig repair step since November 2014.
2015-12-08 08:44:42 +01:00
Lukas Reschke 8903afec26 Don't write directives from CLI 2015-12-08 08:17:04 +01:00
Lukas Reschke 0a89073c47 Run .htaccess updates in any case
This is the same what we also do in updater.php and thus this aligns the code. Makes the code paths more consistent.
2015-12-08 08:16:24 +01:00
Lukas Reschke 235094ab54 Remove version check out of .htaccess
This can now be achieved using the new code signing.
2015-12-08 08:16:23 +01:00
Lukas Reschke 3bce1b20fe Add DirectorySlash to dynamic .htaccess write
When `DirectorySlash off` is set then Apache will not lookup folders anymore. This is required for example when we use the rewrite directives on an existing path such as  `/core/search`. By default Apache would load `/core/search/` instead `/core/search` so the redirect would fail here.

This leads however to the problem that URLs such as `localhost/owncloud` would not load anymore while `localhost/owncloud/` would. This has caused problems such as https://github.com/owncloud/core/pull/21015

With this change we add the `DirectorySlash off` directive only when the `.htaccess` is writable to the dynamic part of it. This would also make `localhost/owncloud` work again as it would trigger the 404 directive which triggers the redirect in base.php.
2015-12-08 08:10:55 +01:00
Jenkins for ownCloud 736e133c04 [tx-robot] updated from transifex 2015-12-08 01:56:19 -05:00
Thomas Müller 4100263bd6 Merge pull request #20996 from owncloud/issue-12215-remove-password-reset-when-not-possible
Issue 12215 remove password reset when not possible
2015-12-07 19:55:26 +01:00
Scrutinizer Auto-Fixer 453e1bf66e Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-12-07 15:43:36 +00:00
Roeland Jago Douma 780d80d7c3 The ajax code path unshares a link share when updating the password
In order to not mess up existing shares if the password gets verified we
should first fire this validation.
2015-12-07 16:38:49 +01:00
Thomas Müller 663f31b127 Merge pull request #20993 from owncloud/issue-20666-language-always-overwritten
Do not overwrite the language when it's just missing for one app
2015-12-07 16:19:21 +01:00
Joas Schilling 87bc02c6cd Allow specifying a custom reset-password-url 2015-12-07 15:41:40 +01:00
Thomas Müller a9e5faf7d0 Merge pull request #20981 from owncloud/issue-19848-multiple-emails-for-sharelink
Allow sending a share email to multiple users
2015-12-07 15:17:19 +01:00
Joas Schilling f8f3c9ecf9 Remove password reset when the user can not change the password 2015-12-07 15:14:19 +01:00
Joas Schilling c6dbe8ac63 Do not overwrite the language when it's just missing for one app 2015-12-07 14:46:53 +01:00
Thomas Müller d155c8e5fe Add unix_socket support for mysql during initial installation - fixes #20210 2015-12-07 12:00:31 +01:00
Joas Schilling 5b87413792 Allow sending a share email to multiple users 2015-12-07 10:49:34 +01:00
Thomas Müller 764b2932ff Merge pull request #20960 from owncloud/drop-OC_Util-getUrlContent
Remove OC_Util::getUrlContent and replace by proper usage of public i…
2015-12-07 10:21:16 +01:00
Thomas Müller f3d49a89fe Merge pull request #11131 from owncloud/use-phpini-wrapper
Replacing ini_get instances with inigetwrapper usages
2015-12-07 10:20:59 +01:00
Thomas Müller 0c3d97921f Merge pull request #20904 from owncloud/view-mime-filter
Fix mimetype filter in getDirectoryContent
2015-12-07 10:20:43 +01:00
Thomas Müller e1f2965e54 Merge pull request #20949 from owncloud/fix_20892
[Sharing] Properly check if a group already has access
2015-12-07 10:20:05 +01:00
Thomas Müller c1fb9fa483 Merge pull request #20957 from owncloud/use-correct-method-signature
Use correct method signature
2015-12-07 10:18:03 +01:00
Thomas Müller c9069d5711 Merge pull request #20959 from owncloud/drop-OC_App-setActiveNavigationEntry
Remove unused setActiveNavigationEntry of OC_App - it's also in OCP\App
2015-12-07 10:17:44 +01:00
Jenkins for ownCloud 884946276e [tx-robot] updated from transifex 2015-12-07 01:54:35 -05:00
Jenkins for ownCloud d14f128329 [tx-robot] updated from transifex 2015-12-06 01:54:33 -05:00
Jenkins for ownCloud f0b1ba713d [tx-robot] updated from transifex 2015-12-05 01:55:14 -05:00
Morris Jobke 4548a0aa90 Remove OC_Util::getUrlContent and replace by proper usage of public interfaces 2015-12-04 18:02:47 +01:00
Vincent Petry 316b907a13 Fixed system tags DAV and API and docs 2015-12-04 17:30:50 +01:00
Morris Jobke 46a6c6d70b remove OC_App::getActiveNavigationEntry - not unsed anymore 2015-12-04 17:26:28 +01:00
Morris Jobke e6d4496fc2 Remove unused setActiveNavigationEntry of OC_App - it's also in OCP\App 2015-12-04 17:23:51 +01:00
Lukas Reschke d522797227 Use correct method signature
This function takes only one parameter
2015-12-04 15:52:42 +01:00
Roeland Jago Douma 11d8b336e2 [Sharing] Properly check if a group already has access
The old code check was to liberal resulting in wrong matches if a user
with the same name as the group already had access.

Fixes 20892
2015-12-04 12:22:21 +01:00
Thomas Müller 6034c9142d Merge pull request #20933 from owncloud/more-OC_Config-cleanups
More cleanups of OC_Config usage
2015-12-04 09:06:47 +01:00
Jenkins for ownCloud a2848af625 [tx-robot] updated from transifex 2015-12-04 01:56:31 -05:00
Thomas Müller 602b636d3e Merge pull request #20807 from owncloud/dont-append-redirect-url-if-user-is-already-logged-in
Don't append redirect URL if user is logged-in
2015-12-03 16:53:59 +01:00
Thomas Müller 2ceae43989 Merge pull request #20545 from owncloud/scan-storage-in-background-job
Move files/ajax/scan.php to background job
2015-12-03 16:53:46 +01:00
Morris Jobke c60c793cf2 More cleanups of OC_Config usage 2015-12-03 16:41:23 +01:00
Thomas Müller 1fe7957fd0 Merge pull request #20924 from owncloud/use-url-generator-to-generate-link
Use URLGenerator instead of hard-coded WEBROOT
2015-12-03 15:26:14 +01:00
Vincent Petry cc72c6a30d Added dav endpoints for system tags 2015-12-03 15:23:21 +01:00
Lukas Reschke 1f69dcb593 Use URLGenerator instead of hard-coded WEBROOT
Fixes https://github.com/owncloud/core/issues/20922
2015-12-03 14:42:14 +01:00
Morris Jobke aa0265bd34 Replace OC_Config in setup 2015-12-03 14:35:15 +01:00
Thomas Müller 2d1cc8aaeb Merge pull request #19461 from owncloud/reuse_code
reuse code
2015-12-03 13:55:50 +01:00
Robin Appelman 19b2fe6a3a Fix mimetype filter in getDirectoryContent 2015-12-03 13:09:13 +01:00
Jesús Macias 9dd11091d4 Fix code from comments 2015-12-03 10:00:11 +01:00
Jesús Macias 98f5c50aa4 Migrate storate status code to storagenotavailablexception 2015-12-03 09:59:45 +01:00
Jesús Macias 4ead2bc861 Fix code from PR comments 2015-12-03 09:58:55 +01:00
Jesús Macias 7cd13f462a Add new external storage exceptions for different errors 2015-12-03 09:57:59 +01:00
Thomas Müller e7239b6553 Merge pull request #20872 from owncloud/systemtags-better-not-found-exception
Systemtags better not found exception
2015-12-03 09:26:05 +01:00
Thomas Müller a5c80ba8bc Merge pull request #20894 from owncloud/post-delete-meta-view
Also add metadata for postDelete hooks triggered from the view
2015-12-03 09:24:54 +01:00
Thomas Müller 7fefd4f4d9 Merge pull request #20860 from owncloud/use-user-getEMailAddress-all-over-the-place
User IUser::getEMailAddress() all over the place
2015-12-03 09:21:53 +01:00
Thomas Müller 09600058d0 Merge pull request #20901 from owncloud/get-rid-of-more-legacy-config-stuff
Replace old config code with usage of proper APIs
2015-12-02 21:54:42 +01:00
Thomas Müller dcc7ff09ba Adding unit test for MailNotifications::sendInternalShareMail() 2015-12-02 21:42:14 +01:00
Thomas Müller eebe2b9c23 User IUser::getEMailAddress() all over the place 2015-12-02 21:25:05 +01:00
Thomas Müller df5872ec50 Merge pull request #20719 from owncloud/adding-system-addressbook-of-users
Adding system addressbook for users of this instance - a occ command …
2015-12-02 16:17:58 +01:00
Morris Jobke 37ecde065b Replace old config code with usage of proper APIs 2015-12-02 15:56:59 +01:00
Morris Jobke baecfc4080 Reduce OC_Config usage in lib/
* replaced by proper public interfaces
2015-12-02 14:49:40 +01:00
Thomas Müller 28ceab2f61 Fix endless recursion 2015-12-02 14:44:41 +01:00