Commit Graph

8277 Commits

Author SHA1 Message Date
Morris Jobke 4d90fd933f Merge pull request #13699 from owncloud/check-if-file-exists
Use `file_exists` to verify that config file exists
2015-01-27 14:16:40 +01:00
Lukas Reschke 9771ead7dd Merge pull request #13701 from owncloud/disable-appcode-checker
disable the app code checker - some previous shipped apps cannot be inst...
2015-01-27 11:53:03 +01:00
Thomas Müller b7cf4d551e let init() take an INode - fixes PHP message 2015-01-27 11:31:37 +01:00
Thomas Müller 956de27e94 Merge pull request #13676 from owncloud/fix-node-iface
Fix node interface
2015-01-27 09:34:59 +01:00
Thomas Müller 9a75304b02 disable the app code checker - some previous shipped apps cannot be installed from the appstore now 👊 2015-01-27 09:27:38 +01:00
Thomas Müller f248ee013b Merge pull request #13694 from owncloud/little-bit-more-descriptive-htaccess-error
Make error more descriptive
2015-01-27 09:15:57 +01:00
Jenkins for ownCloud c8f58054b0 [tx-robot] updated from transifex 2015-01-27 01:54:34 -05:00
Lukas Reschke 17f2cfbb9c Use `file_exists` to verify that config file exists
There might be the case that `fopen($file, 'r')` returns false and thus ownCloud might believe that the config file is empty and thus potentially leading to an overwrite of the config file.

This changeset introduces `file_exists` again which was used in ownCloud 5 where no such problems where reported and should not be affected by such problems.

Ref https://github.com/owncloud/core/issues/12785#issuecomment-71548720
2015-01-27 00:50:14 +01:00
Lukas Reschke d8559dc78f Make error more descriptive
Ref https://github.com/owncloud/core/issues/13693#issuecomment-71546767
2015-01-26 23:00:15 +01:00
Bjoern Schiessle 5ba19ba7fc certificate manager should always use a \OC\Files\View otherwise we will get problems for different primary storages 2015-01-26 16:58:52 +01:00
Bjoern Schiessle 67da1f7e5a certificate manager only needs the user-id, no need to pass on the complete user object 2015-01-26 16:58:52 +01:00
Bernhard Posselt b8769802df fix node interface 2015-01-26 15:58:41 +01:00
Vincent Petry 87ce64c24e Replace OC_Log::ERROR with OCP\Util::ERROR 2015-01-26 15:51:31 +01:00
Vincent Petry f6e644b43f Catch storage exception in scanner for remote shares
Whenever an exception occurs during scan of a remote share, the share is
checked for availability. If the storage is gone, it will be removed
automatically.

Also, getDirectoryContent() will now skip unavailable storages.
2015-01-26 13:59:49 +01:00
Thomas Müller 5da4071c45 Merge pull request #13621 from owncloud/system-config-multiset
Add a method to set/unset multiple config values with one write
2015-01-26 13:36:22 +01:00
Thomas Müller 9ad9d7bfbb naming fixes while reviewing 2015-01-26 12:59:25 +01:00
Jenkins for ownCloud 810d5a6a67 [tx-robot] updated from transifex 2015-01-26 01:54:29 -05:00
Jenkins for ownCloud a698637e91 [tx-robot] updated from transifex 2015-01-25 01:54:38 -05:00
Jenkins for ownCloud b8e1dd9c87 [tx-robot] updated from transifex 2015-01-24 01:54:51 -05:00
Olivier Paroz 7fbf1a20d7 Updated the media type of some font types
TTF and TTF have now the same media type
Official since 2013 and supported by Firefox and Chrome
https://www.iana.org/assignments/media-types/application/font-sfnt

Introducing support for Type1 fonts
2015-01-24 01:49:13 +01:00
Clark Tomlinson f8b1fde2c0 Merge pull request #13626 from owncloud/check-for-hhvm
Don't check for `always_populate_raw_post_data` on HHVM
2015-01-23 10:28:47 -05:00
Robin Appelman 87a1b2bdc4 Preserve mtime when doing cross storage move 2015-01-23 15:11:27 +01:00
Vincent Petry 8fa3e7a6bf Do not retrieve shares through group if user has no group 2015-01-23 15:11:06 +01:00
Joas Schilling 039397bd31 Use setConfigs() instead of calling setConfig() multiple times 2015-01-23 14:52:21 +01:00
Lukas Reschke 30a5758a95 Don't check for `always_populate_raw_post_data` on HHVM
HHVM seems to have problems with this at the moment (even setting those values in the php.ini of HHVM doesn't have helped much) and thus the unit test execution failed.

So it's better if we disable this check for now for HHVM.
2015-01-23 13:54:34 +01:00
Robin Appelman 960ff4f136 Apply wrappers to existing mounts before registering it 2015-01-23 13:48:35 +01:00
Vincent Petry 5fb8a4715d removeStorageWrapper to unregister a storage wrapper 2015-01-23 12:20:54 +01:00
Joas Schilling c61e9f3912 Add a method to set/unset multiple config values in one call
This reduces the number of file writes we do for config.php and therefor
hopefully helps lowering the chances for empty config.php files
2015-01-23 11:00:53 +01:00
Morris Jobke 7e4afa3f25 Merge pull request #13593 from owncloud/add-check-for-raw-post-data
Add check for `HTTP_RAW_POST_DATA` setting for >= 5.6
2015-01-22 23:59:52 +01:00
Morris Jobke 254a1fa12a Merge pull request #13314 from owncloud/login-hook-logout
Return false if the login is canceled in a hook
2015-01-22 23:34:19 +01:00
Thomas Müller 5776bfec05 Merge pull request #13449 from owncloud/image_preview_limit
add config-option for an image's maximum filesize when generating previews
2015-01-22 23:02:38 +01:00
Georg Ehrke 3af8bde949 add config-option for an image's maximum filesize when generating previews 2015-01-22 20:21:37 +01:00
Georg Ehrke 6b33481652 remove insane debug-log from OC_Image 2015-01-22 20:17:25 +01:00
Thomas Müller 8f06bf7bc6 Merge pull request #13598 from owncloud/fix-undefined-offset
Fix undefined offset 1 for wrong user mail address
2015-01-22 17:16:23 +01:00
Vincent Petry 6fb553e92c Do not call wrapStorage if storate with same name added twice 2015-01-22 16:24:24 +01:00
Morris Jobke 3d42ecea37 Fix undefined offset 1 for wrong user mail address
* fixes Undefined offset: 1 at lib/private/mail.php#143
2015-01-22 16:23:50 +01:00
Thomas Müller f4a9164660 Merge pull request #13600 from owncloud/server-warning
Get rid of log warning when using servercontainer
2015-01-22 16:03:54 +01:00
Bernhard Posselt 9df297324f get rid of log warning when using servercontainer 2015-01-22 15:33:09 +01:00
Morris Jobke 55c28608c9 translate error messages 2015-01-22 14:52:47 +01:00
Robin Appelman 8eda661761 Throw an exception when login is canceled by an app 2015-01-22 14:13:17 +01:00
Robin Appelman 8a9acc5083 Allow custom error messages for the login page 2015-01-22 14:13:02 +01:00
Lukas Reschke bb80cf4eca Add check for `HTTP_RAW_POST_DATA` setting for >= 5.6
PHP 5.6 otherwise throws notices for perfectly valid code which results in broken endpoints.

Fixes https://github.com/owncloud/core/issues/13592
2015-01-22 13:50:38 +01:00
Morris Jobke b5b491d1bb Merge pull request #13509 from owncloud/share-deletechildrenwhenunsharefromgroup
Fix reshare permission change to not impair other deletion code
2015-01-22 10:40:29 +01:00
Vincent Petry 9f137ac259 Fix reshare permission change to not impair other deletion code
A recent change that prevents reshare permission changes to delete group
share children had the side-effect of also preventing group share
children deletion when it needed to be done.

This fix adds an extra flag to isolate the "reshare permission change"
deletion case and keep the other ones as they were before, not only to
fix the regression but also fix other potential regressions in code that
uses this method.

Also updated the comment because now Helper::delete() is no longer
limited to reshares but also applies to group share children.
2015-01-22 10:12:47 +01:00
Thomas Müller c13bf8d820 Merge pull request #13552 from owncloud/request-uri-double-slash
Remove duplicated slashes from the requested url
2015-01-21 21:56:09 +01:00
Joas Schilling d4657aa592 Set the debugoutput channel to error_log instead of echoing it 2015-01-21 15:32:31 +01:00
Robin Appelman 04075eba6b Remove duplicated slashes from the requested url 2015-01-21 15:04:18 +01:00
Jenkins for ownCloud b8ab21d3ad [tx-robot] updated from transifex 2015-01-21 01:55:15 -05:00
Thomas Müller 84bb4cc2e9 Merge pull request #13499 from owncloud/issue/13451-redis-json-encode
Issue/13451 redis json encode
2015-01-20 14:53:33 +01:00
Joas Schilling e25998df0f Json_(en|de)code values on redis to be able to cache arrays 2015-01-20 10:51:27 +01:00
Lukas Reschke 476579b9c6 Fix WebDAV auth for session authentication only
\Sabre\DAV\Auth\Backend\AbstractBasic::authenticate was only calling \OC_Connector_Sabre_Auth::validateUserPass when the response of \Sabre\HTTP\BasicAuth::getUserPass was not null.

However, there is a case where the value can be null and the user could be authenticated anyways: The authentication via ownCloud web-interface and then accessing WebDAV resources. This was not possible anymore with this patch because it never reached the code path in this scenario.

This patchs allows authenticating with a session without isDavAuthenticated value stored (this is for ugly WebDAV clients that send the cookie in any case) and thus the functionality should work again.

To test this go to the admin settings and test if the WebDAV check works fine. Furthermore all the usual stuff (WebDAV / Shibboleth / etc...) needs testing as well.
2015-01-20 10:03:14 +01:00
Jenkins for ownCloud 2ac015256f [tx-robot] updated from transifex 2015-01-20 01:54:37 -05:00
Morris Jobke 870bc429b2 Merge pull request #13416 from owncloud/reauthenticate-if-session-differs-from-basic-auth
Prioritise Basic Auth header over Cookie
2015-01-19 22:23:02 +01:00
Lukas Reschke cbffaff7a0 Merge pull request #13480 from owncloud/mysql-autocommit
set MySQL autocommit on connection setup
2015-01-19 19:39:26 +01:00
Thomas Müller baefefbbc8 set MySQL autocommit on connection setup 2015-01-19 17:20:49 +01:00
Vincent Petry ef8d38ca27 Fix chunked query for tags + unit test 2015-01-19 17:05:44 +01:00
Lukas Reschke 730460c9fa Close session properly 2015-01-19 16:25:44 +01:00
Thomas Müller 65041440de check is mimetype is set - fixed #13452 2015-01-19 15:04:53 +01:00
Morris Jobke a28d3b594b Fix exif orientation for flipped images
fixes #13363

Links:
 * http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/
 * Example data: https://github.com/recurser/exif-orientation-examples
2015-01-18 23:15:52 +01:00
Thomas Müller d2d6472e39 Merge pull request #13423 from owncloud/share-fixfindshareforuserwithmultiplegroups
Fix getItemSharedWithUser for groups
2015-01-19 12:34:28 +01:00
Thomas Müller 4fcfedb03c Merge pull request #13438 from owncloud/cache-the-array
Reuse the array key of mimetypes
2015-01-19 08:40:25 +01:00
Lukas Reschke 309cc9a6ca Reuse the array key of mimetypes
This function is called a lot of times and was really slow before due to not reusing the same array.

Previously when it was called 500'000 times it took about 2seconds, now we're down to 0.2 seconds on my local machine.

Ref https://github.com/owncloud/core/issues/13434
2015-01-18 14:50:34 +01:00
Lukas Reschke dfbc405a45 Prioritise Basic Auth header over Cookie
There are a lot of clients that support multiple WebDAV accounts in the same application. However, they resent all the cookies they received from one of the accounts also to the other one. In the case of ownCloud this means that we will always show the user from the session and not the user that is specified in the basic authentication header.

This patch adds a workaround the following way:

1. If the user authenticates via the Sabre Auth Connector add a hint to the session that this was authorized via Basic Auth (this is to prevent logout CSRF)
2. If the request contains this hint and the username specified in the basic auth header differs from the one in the session relogin the user using basic auth

Fixes https://github.com/owncloud/core/issues/11400 and https://github.com/owncloud/core/issues/13245 and probably some other issues as well.

This requires proper testing also considering LDAP / Shibboleth and whatever instances.
2015-01-17 13:29:07 +01:00
Jenkins for ownCloud 60c4cb1dd6 [tx-robot] updated from transifex 2015-01-17 01:54:40 -05:00
Lukas Reschke 744cf713f7 Merge pull request #13319 from owncloud/replace-line-breaks-in-app-description
replace line breaks in the app description by spaces - fixes #13315
2015-01-17 01:03:41 +01:00
Vincent Petry 40931a8b0d Fix getItemSharedWithUser for groups
Fixed SQL query for whenever a user has more than one group.
Added missing $owner where clause for group lookup.
Added unit tests for the group cases.
2015-01-16 18:11:13 +01:00
Morris Jobke 0f0204ee35 Merge pull request #13160 from owncloud/extstorage-ocbackendnopartfile
Disable part files for OC ext storage backend + s2s backend
2015-01-16 13:38:59 +01:00
Frank Karlitschek 696d9dc98e Merge pull request #13406 from owncloud/fix-php-doc
Fix PHPDoc
2015-01-15 20:35:30 -05:00
Lukas Reschke a1e92d61b3 Fix PHPDoc 2015-01-15 22:50:42 +01:00
Thomas Müller 051f626617 Merge pull request #13389 from owncloud/issue/13372-failing-oracle-tests-jenkins
Mask table and column names with backticks and add lastInsertID() workar...
2015-01-15 22:41:57 +01:00
Robin Appelman 2248e465af Remove children from the cache in one query 2015-01-15 17:26:12 +01:00
Morris Jobke 36ced1f002 Merge pull request #13388 from owncloud/type-hint-url-params
Add PHPDoc for `urlParams`
2015-01-15 16:00:48 +01:00
Bernhard Posselt bb0c88a577 always set url parameters when they are available in the app dispatch
prefer url parameters passed into the main method. If they are not present, use the containers urlParameters

add space
2015-01-15 15:22:52 +01:00
Joas Schilling 6769adcd0d Mask table and column names with backticks and add lastInsertID() workaround 2015-01-15 14:43:06 +01:00
Lukas Reschke 0da08bdb2c Add PHPDoc for `urlParams` 2015-01-15 14:42:44 +01:00
Thomas Müller 337c43ce92 Merge pull request #13317 from owncloud/partfile-fileinfo
Return valid fileinfo objects for part files
2015-01-14 22:39:19 +01:00
Morris Jobke 64d7463ca3 Merge pull request #13344 from owncloud/issue/13334-cleanup-tags-repairstep
Add a repair step to clean up orphan tags and tag entries
2015-01-14 20:43:23 +01:00
Morris Jobke 34d6a1596c Merge pull request #13367 from owncloud/type-hint-server-method-from-request
Add PHPDoc for magic property 'server'
2015-01-14 20:23:52 +01:00
Lukas Reschke 04ae8d2ea0 Add PHPDoc for magic property 'server' 2015-01-14 19:36:22 +01:00
Morris Jobke 455ad005a0 Merge pull request #13350 from owncloud/autoload-translations
Autoload app's js translations
2015-01-14 18:12:05 +01:00
Joas Schilling a22068cce3 Add a repair step to clean up orphan tags and tag entries 2015-01-14 16:49:25 +01:00
Bernhard Posselt 6737dd111d ignore core 2015-01-14 15:27:37 +01:00
Bernhard Posselt 4ec4914bb4 move check into addTranslation method 2015-01-14 14:57:56 +01:00
Bernhard Posselt 1cce1f0e6b dont load core scritps 2015-01-14 14:43:11 +01:00
Morris Jobke 520d8ec53b OC_App::parseAppInfo
* replace line breaks (on non empty lines) in the app description by spaces
* fixes #13315
* includes unit tests
2015-01-14 13:58:31 +01:00
Bernhard Posselt d6f1ff7993 only load translsations for apps 2015-01-14 13:48:21 +01:00
Bernhard Posselt 8cb60b2366 make translation lookup faster (O(n) -> O(1)) 2015-01-14 13:39:29 +01:00
Bernhard Posselt 717e3acd9b autoload app's js translations 2015-01-14 13:34:52 +01:00
Joas Schilling 4b3a3dc0bb Check new and old ways of required oC version for app compatibility 2015-01-14 13:02:02 +01:00
Björn Schießle 5745b68fa9 Merge pull request #13311 from owncloud/fix_restore_keys
adapt decrypt all to the new folder structure
2015-01-14 11:40:22 +01:00
Jenkins for ownCloud f367bbb49d [tx-robot] updated from transifex 2015-01-14 01:55:16 -05:00
Morris Jobke c8fa85451c Merge pull request #13320 from owncloud/fix-php-doc-for-files-view
Fix annotations in file view
2015-01-13 18:05:00 +01:00
Morris Jobke 0a400b4577 drop unused parameter 2015-01-13 18:04:20 +01:00
Lukas Reschke d66facc762 Fix annotations in file view 2015-01-13 14:53:00 +01:00
Robin Appelman 96dff341e2 Return valid fileinfo objects for part files 2015-01-13 13:59:28 +01:00
Morris Jobke 7746ac519f drop dead code - ref #13301 2015-01-13 13:52:25 +01:00
Bernhard Posselt ba8c050d2b Merge pull request #13217 from owncloud/make-basic-auth-work-again
Fix Basic Auth in master for applications
2015-01-13 13:35:54 +01:00
Thomas Müller 543fa0d45b Merge pull request #13291 from owncloud/node-searchcommonbasepathfix
Fix searchCommon to properly match path name
2015-01-13 13:25:51 +01:00
Robin Appelman 857695ec87 Return false if the login is canceled in a hook 2015-01-13 13:25:20 +01:00
Bjoern Schiessle 89f17ef6fe adapt decrypt all and restore/delete key backups to the new folder structure for encryption key introduced with OC8 2015-01-13 12:45:33 +01:00