Commit graph

8665 commits

Author SHA1 Message Date
Lukas Reschke
38fec9b095 Can also be null
If the user does not exist this returns null and can lead to nasty bugs since the IDE is not indicating this...
2015-03-13 14:01:24 +01:00
Lukas Reschke
4eb118dd33 Use proper error type and clean-up code 2015-03-13 13:21:09 +01:00
Lukas Reschke
93a303970f Remove OC_User_HTTP
Addresses No. 1 from https://github.com/owncloud/core/issues/14847
2015-03-13 12:26:33 +01:00
Jenkins for ownCloud
d17630d6be [tx-robot] updated from transifex 2015-03-13 01:54:55 -04:00
Thomas Müller
5855108e9b drop any fallback code related to curl - refs https://github.com/owncloud/core/pull/14838#issuecomment-78586447 2015-03-12 21:43:41 +01:00
Lukas Reschke
00f5025ff1 Add cURL as hard-dependency
It is required by other functionalities such as S2S anyways and ownCloud will fail hard at a lot of places without it.
2015-03-12 18:39:54 +01:00
Thomas Müller
80ef53eff0 verify the file name length not to exceed 255 characters + verify path during rename 2015-03-12 10:47:47 +01:00
Joas Schilling
fefcbb966b Also use all keys for an empty array, just in case 2015-03-12 09:18:43 +01:00
Jenkins for ownCloud
454a2563bc [tx-robot] updated from transifex 2015-03-12 01:55:59 -04:00
Morris Jobke
dbd2bb66e9 Merge pull request #14357 from owncloud/fix/1373
Run `updateDataDirectory` after Update
2015-03-11 18:33:51 +01:00
Lukas Reschke
f9fd1629da Merge pull request #14705 from rullzer/avatarcontroller
Move AvatarController to AppFramework
2015-03-11 17:15:42 +01:00
Morris Jobke
82254ad5ef Merge pull request #13893 from owncloud/create-cachedir-on-user
Only make sure the cache directory exists when we use it
2015-03-11 16:49:24 +01:00
Roeland Jago Douma
1a0f9c375b Avatar controller moved to AppFrameWork
* Original avatarcontroller migrated to the appframework
* Added DataDisplayResponse that show data inline in the browser (used
  to retrun the image)
* Removed some unneeded code
* Added unit tests for the avatarcontroller
2015-03-11 16:37:42 +01:00
Lukas Reschke
73dc02d42c Merge pull request #14798 from owncloud/enable-oci-autotest-master
Setting oci as supported database
2015-03-11 16:14:54 +01:00
Morris Jobke
04eef93b25 Merge pull request #13648 from oparoz/sfnt-fonts-preview
Add support for font previews
2015-03-11 15:56:32 +01:00
Thomas Müller
96b223676d Don't play with config values ... 2015-03-11 15:47:24 +01:00
Morris Jobke
dbade19362 Merge pull request #13839 from owncloud/issue/13678-improve-remote-domain-detection-in-sharedropdown
Better finding the remote URL from user input in share dropdown
2015-03-11 14:38:41 +01:00
Morris Jobke
ad97ceb787 Merge pull request #13513 from owncloud/repair-legacystoragenofatalfail
Do not abort when meeting unfixable legacy storages
2015-03-11 13:32:33 +01:00
Lukas Reschke
8154ed4d2c Merge pull request #14791 from owncloud/fix-14516
Adding a more meaningful message for sabre dav exception
2015-03-11 12:52:18 +01:00
Thomas Müller
0d0f9a52d2 Merge pull request #14788 from cmeh/patch-3
Correct "one invalid characters" to "one invalid character"
2015-03-11 12:26:49 +01:00
Thomas Müller
0f3e36fdfd Adding a more meaningful message for sabre dav exception - fixes #14516 2015-03-11 11:53:31 +01:00
Bernhard Posselt
abb726c994 Merge pull request #14789 from owncloud/better-app-install-error-messages
display app update error messages
2015-03-11 11:28:28 +01:00
Thomas Müller
ffe06ac5c7 display app update error messages - fixes #14611 2015-03-11 09:59:56 +01:00
cmeh
4a0c649c8a Correct "one invalid characters" to "one invalid character"
Corrected "one invalid characters" to "one invalid character" in line 1575.
2015-03-11 09:59:42 +01:00
Joas Schilling
2af8fea2be Throw a RuntimeException in the cache aswell 2015-03-11 09:33:50 +01:00
Thomas Müller
6c1a1234f8 Properly handle available databases at runtime and respect setup checks in command line as well 2015-03-11 09:27:12 +01:00
Thomas Müller
81fa9550a0 No need to restart the web server in cli mode 2015-03-11 09:27:12 +01:00
Thomas Müller
7181840665 Use occ to install ownCloud in autotest.sh 2015-03-11 09:27:12 +01:00
Joas Schilling
d1511cdbee Fix doc blocks of insertIfNotExists() method 2015-03-11 09:05:30 +01:00
Jenkins for ownCloud
01ea056ac8 [tx-robot] updated from transifex 2015-03-11 01:55:38 -04:00
Lukas Reschke
284bd6647c Merge pull request #14759 from owncloud/clean-up-code
Clean-up code and use proper exception types
2015-03-10 14:18:21 +01:00
Lukas Reschke
6dc59019af Merge pull request #14346 from owncloud/storage-based-path-validation
adding storage specific filename verification
2015-03-10 11:02:47 +01:00
Thomas Müller
214fa44400 Merge pull request #14534 from owncloud/add-child-src
Add support for 'child-src' directive
2015-03-10 10:30:44 +01:00
Thomas Müller
c8ed88f4d6 Merge pull request #14689 from owncloud/better-missing-resource-handling
Log errors and create 404 in network list when a css or js is missing
2015-03-09 23:33:25 +01:00
Thomas Müller
89be55a672 let insertIfNotExist() throw the native DBALException - no need to hide the real exception 2015-03-09 22:37:49 +01:00
Joas Schilling
2747a83a49 Get the id before using it 2015-03-09 22:37:49 +01:00
Joas Schilling
3115d66d60 Better save then sorry 2015-03-09 22:37:49 +01:00
Joas Schilling
940163e16b insertIfNotExists() for storage insertion 2015-03-09 22:37:49 +01:00
Joas Schilling
c917ea183c Only check unique keys for the comparison on filecache insert & update otherwise 2015-03-09 22:37:49 +01:00
Joas Schilling
8fa692388b Allow specifying the compare-array for insertIfNotExists() 2015-03-09 22:37:49 +01:00
Morris Jobke
d34662122d Merge pull request #14429 from owncloud/issue/14176-validate-timezone-before-using
Etc timezones don't exist for .5 and .75 offsets
2015-03-09 16:16:16 +01:00
Joas Schilling
01cd83a902 Merge pull request #14713 from owncloud/issue/14671-preview-delete-check-for-valid-fileid
Check whether the file id is valid, before using it to delete the previews
2015-03-09 11:56:46 +01:00
Lukas Reschke
2ac6f3a4f5 Clean-up code and use proper exception types 2015-03-09 11:48:55 +01:00
Joas Schilling
a12e16e985 Check whether the file id is valid, before using it to delete the previews 2015-03-09 11:25:18 +01:00
Thomas Müller
3623f14e73 no translation service in common storage class 2015-03-09 10:38:38 +01:00
Thomas Müller
2367797c17 Respect http header 'Accept-Language' on ocs and remote.php calls 2015-03-09 10:38:38 +01:00
Thomas Müller
33b11682f9 translate error messages 2015-03-09 10:38:38 +01:00
Lukas Reschke
2f18a09a20 Optimize loop 2015-03-09 10:38:38 +01:00
Thomas Müller
e28d314b53 deprecate isValidFileName() 2015-03-09 10:38:38 +01:00
Thomas Müller
49e1a81eba fixing namespaces and PHPDoc 2015-03-09 10:38:37 +01:00
Thomas Müller
4bac595068 adding storage specific filename verification - refs #13640 2015-03-09 10:38:37 +01:00
Morris Jobke
d550143ba0 proper filename for "require version.php" 2015-03-09 08:03:28 +01:00
Jenkins for ownCloud
174f8cef64 [tx-robot] updated from transifex 2015-03-09 01:54:36 -04:00
Jenkins for ownCloud
377165ae51 [tx-robot] updated from transifex 2015-03-08 01:54:36 -05:00
Jenkins for ownCloud
73c2157171 [tx-robot] updated from transifex 2015-03-07 01:54:37 -05:00
Lukas Reschke
60c507cd4e Merge pull request #14722 from owncloud/master-14711
Fix totally broken AppStore code...
2015-03-06 18:52:12 +01:00
Thomas Müller
1b08b7c726 use insertIfNotExist() in cache put 2015-03-06 15:32:58 +01:00
Thomas Müller
4e37831d85 Fix PHPDoc on the way .... 2015-03-06 14:54:57 +01:00
Thomas Müller
987b683895 Use an atomic implementation on sqlite for insertIfNotExist() 2015-03-06 14:54:54 +01:00
Jenkins for ownCloud
d11f040720 [tx-robot] updated from transifex 2015-03-06 01:54:52 -05:00
Lukas Reschke
d5a8225c0e Fix totally broken AppStore code...
As it turned out the AppStore code was completely broken when it came from apps delivered from the appstore, this meant:

1. You could not disable and then re-enable an application that was installed from the AppStore. It simply failed hard.
2. You could not disable apps from the categories but only from the "Activated" page
3. It did not show the activation state from any category page

This code is completely static and thus testing it is impossible. We really have to stop with "let's add yet another feature in already existing static code". Such stuff has to get refactored first.

That said, this code works from what I can say when clicking around in the AppStore page GUI. However, it may easily be that it does not work with updates or whatsever as I have no chance to test that since the AppStore code is not open-source and it is impossible to write unit-tests for that.

Fixes https://github.com/owncloud/core/issues/14711
2015-03-06 00:16:17 +01:00
Lukas Reschke
9f5433c0c3 Merge pull request #13368 from owncloud/memcache_lowlatency
Refactor \OC\Memcache\Factory
2015-03-05 13:05:17 +01:00
Robin McCorkell
78819da3bf \OC\Memcache\Cache implements \OCP\ICache 2015-03-05 11:36:34 +00:00
Robin McCorkell
0e4933e6d2 Refactor \OC\Memcache\Factory
Caches divided up into two groups: distributed and local. 'Low latency' is an
alias for local caches, while the standard `create()` call tries to get
distributed caches first, then local caches.

Memcache backend is set in `config.php`, with the keys `memcache.local` and
`memcache.distributed`. If not set, `memcache.distributed` defaults to the value
of `memcache.local`.
2015-03-05 11:36:34 +00:00
Jenkins for ownCloud
7e0fd8fb50 [tx-robot] updated from transifex 2015-03-05 01:56:35 -05:00
Joas Schilling
716ba49a82 Log errors and create 404 in network list when a css or js is missing 2015-03-04 17:56:33 +01:00
Lukas Reschke
cdced56f2b Fix PHPDoc
That apparently went lost when changing the signature.
2015-03-04 15:35:41 +01:00
Vincent Petry
aa11b83158 Merge pull request #14682 from owncloud/issue/14681-noop-scanner-outdated
Update scanFile() and scanChildren() to the new signature of the parent ...
2015-03-04 10:07:42 +01:00
Morris Jobke
ac10441600 Merge pull request #14326 from owncloud/remove-unnessary-backslashes-from-translation
Remove unnecessary backslashes from translations
2015-03-04 09:58:42 +01:00
Morris Jobke
f1d74e8803 Merge pull request #14651 from owncloud/add-some-headers-to-htaccess-for-my-best-friend-jenkins
Let users configure security headers in their Webserver
2015-03-04 09:36:01 +01:00
Joas Schilling
09ac2df1f8 Update scanFile() and scanChildren() to the new signature of the parent class 2015-03-04 09:22:53 +01:00
Jenkins for ownCloud
84785a6a39 [tx-robot] updated from transifex 2015-03-04 01:55:19 -05:00
Joas Schilling
e12c83e3dc Merge pull request #14674 from owncloud/fix-l10n-getlanguagecode-2
Jenkins #14650
2015-03-03 18:33:08 +01:00
Joas Schilling
b669bf26d6 Fix the behaviour of getLanguageCode() to match the expectation of the name 2015-03-03 16:47:31 +01:00
Joas Schilling
ed4c05c7b5 Use findLanguage() instead of creating the object first 2015-03-03 16:47:31 +01:00
Joas Schilling
1761b162e6 Merge pull request #14660 from metaworx/replace-static-dbtableprefix-with-config-dbtableprefix
use `dbtableprefix` for temp table and index names
2015-03-03 16:43:47 +01:00
Thomas Müller
be27188649 Merge pull request #14574 from owncloud/fix-irequest-for-older-php-versions
Read from IRequest instead of reading twice
2015-03-03 14:22:56 +01:00
Thomas Müller
e30ca8198f Merge pull request #14638 from owncloud/issue/14538-repairstep-drop-old-tables
Add a repair step to delete old tables
2015-03-03 13:37:54 +01:00
Thomas Müller
29ecbc8c6c Merge pull request #14496 from owncloud/kill-substr-mssql-master
[Master] Remove hacky Substring support for MSSQL
2015-03-03 11:00:13 +01:00
Joas Schilling
276d678080 Etc timezones don't exist for .5 and .75 offsets 2015-03-03 09:08:47 +01:00
Jenkins for ownCloud
e271fa3ee8 [tx-robot] updated from transifex 2015-03-03 01:55:50 -05:00
martin-rueegg
6be8ab65a5 replace 'oc_' with dbtableprefix form config for temporary table names and indexes 2015-03-03 01:54:15 +01:00
Lukas Reschke
c3c993446e Run updateDataDirectory after Update
Fixes https://github.com/owncloud/core/issues/13731
2015-03-02 19:39:17 +01:00
Lukas Reschke
bbd5f28415 Let users configure security headers in their Webserver
Doing this in the PHP code is not the right approach for multiple reasons:

1. A bug in the PHP code prevents them from being added to the response.
2. They are only added when something is served via PHP and not in other cases (that makes for example the newest IE UXSS which is not yet patched by Microsoft exploitable on ownCloud)
3. Some headers such as the Strict-Transport-Security might require custom modifications by administrators. This was not possible before and lead to buggy situations.

This pull request moves those headers out of the PHP code and adds a security check to the admin settings performed via JS.
2015-03-02 19:07:46 +01:00
Robin Appelman
00568af74d Allow running the async commands from unit tests 2015-03-02 15:25:31 +01:00
Vincent Petry
e61aa3723e Merge pull request #14573 from owncloud/enc-migrate-disable-updater
Disable the cache updater when doing the encryption migration
2015-03-02 14:53:29 +01:00
Joas Schilling
195c577c77 Add a repair step to delete old tables 2015-03-02 12:02:14 +01:00
Morris Jobke
4009f15255 Merge pull request #14593 from owncloud/fix/13994
Add detection for invalid CLI configuration for settings page
2015-03-02 09:19:26 +01:00
Lukas Reschke
afb0d742b9 Simplify code 2015-03-01 12:35:41 +01:00
Morris Jobke
36a4ee27ba Merge pull request #14605 from owncloud/checkserver-disable-hhvm
Disable some server checks when running on HHVM
2015-03-01 12:12:01 +01:00
Lukas Reschke
faddd1e256 Simplify code 2015-03-01 11:46:39 +01:00
Jenkins for ownCloud
ff85d38c2a [tx-robot] updated from transifex 2015-03-01 01:54:38 -05:00
Lukas Reschke
b29940d956 Add support for 'child-src' directive
This is required when working with stuff such as PDF.js in the files_pdfviewer application. Opt-in only.

Master change only because the stable CSP policies has a failback that allows nearly anything 🙈
2015-02-28 12:27:46 +01:00
Lukas Reschke
4100610390 Disable some server checks when running on HHVM
Ref https://github.com/owncloud/core/issues/10837#issuecomment-76516839
2015-02-28 10:08:41 +01:00
Lukas Reschke
b6d8a48ce1 Add detection for invalid CLI configuration for settings page
This change will log all failures that prevent the CLI cronjob from happening to the database and display a warning to administrators when an error happened.

To test:

1. Configure some invalid CLI php.ini settings
2. Enable the CLI cronjob and run php cron.php
3. See the errors printed and also in the admin page
4. Configure the CLI settings correctly
5. Errors should be gone.

Fixes https://github.com/owncloud/core/issues/13994
2015-02-27 20:20:34 +01:00
Robin Appelman
f6182aa87e Allow disabling the cache updater 2015-02-27 17:14:16 +01:00
Morris Jobke
b4dfd043d7 Merge pull request #14575 from owncloud/cache-rename-overwrite
Fix cache update when doing a rename that overwrites the target
2015-02-27 17:11:37 +01:00
Robin Appelman
fc027bceb7 Fix cache update when doing a rename that overwrites the target 2015-02-27 16:39:58 +01:00
Bernhard Posselt
970b14d297 Merge pull request #13616 from owncloud/streamresponse
AppFramework StreamResponse
2015-02-27 15:43:01 +01:00
Bernhard Posselt
95239ad21e AppFramework StreamResponse
First stab at the StreamResponse, see #12988

The idea is to use an interface ICallbackResponse (I'm not 100% happy with the name yet, suggestions?) that allow the response to output things in its own way, for instance stream the file using readfile

Unittests are atm lacking, plan is to

check if a mock of ICallbackResponse will be used by calling its callback (also unhappy with this name) method
Usage is:

$response = new StreamResponse('path/to/file');

rename io to output, add additional methods and handle error and not modified cases when using StreamResponse

fix indention and uppercasing, also handle forbidden cases

fix indention

fix indention

no forbidden, figuring out if a file is really readable is too complicated to get to work across OSes and streams

remove useless import

remove useless import

fix intendation
2015-02-27 15:42:33 +01:00