Commit Graph

11939 Commits

Author SHA1 Message Date
Roeland Jago Douma bd27eadf9e
Move \OCP\Notification to PSR-4 2016-05-18 18:21:27 +02:00
Roeland Jago Douma 1c721771ff
Move \OCP\Migration to PSR-4 2016-05-18 18:19:24 +02:00
Vincent Petry 01f44d83b2 Merge pull request #24691 from owncloud/fixchunkttl
Allow chunk GC mtime tolerance for unfinished part chunks
2016-05-18 18:19:08 +02:00
Roeland Jago Douma babdf8477d
Move \OCP\Mail to PSR-4 2016-05-18 17:42:33 +02:00
Roeland Jago Douma 12fd87d0a3
Move \OCP\Lock to PSR-4 2016-05-18 17:10:04 +02:00
Vincent Petry 4a94203492 Merge pull request #24706 from owncloud/http_psr4
Move \OCP\Http to PSR-4
2016-05-18 16:50:17 +02:00
Roeland Jago Douma 40bf0a913f
Move \OCP\L10N to PSR-4 2016-05-18 16:38:44 +02:00
Vincent Petry 6231b72e25 Merge pull request #24677 from owncloud/single-token-provider
a single token provider suffices
2016-05-18 16:31:53 +02:00
Roeland Jago Douma 4a53542e45
Move \OCP\Files to PSR-4 2016-05-18 14:35:50 +02:00
Robin Appelman e6386652df Trigger propagation from the background scanner 2016-05-18 14:31:43 +02:00
Vincent Petry e0af5263fb
Allow chunk GC mtime tolerance for unfinished part chunks
Whenever part chunks are written, every fwrite in the write loop will
reset the mtime to the current mtime. Only at the end will the touch()
operation set the mtime to now + ttl, in the future.

However the GC code is expecting that every chunk with mtime < now are
old and must be deleted. This causes the GC to sometimes delete part
chunks in which the write loop is slow.

To fix this, a tolerance value is added in the GC code to allow for
more time before a part chunk gets deleted.
2016-05-18 13:39:37 +02:00
Roeland Jago Douma 1d2c1e60ee
Move \OCP\Http to PSR-4 2016-05-18 09:24:10 +02:00
Christoph Wurst 98b465a8b9
a single token provider suffices 2016-05-18 09:20:48 +02:00
Jenkins for ownCloud 765782445a [tx-robot] updated from transifex 2016-05-18 01:54:53 -04:00
Roeland Douma d5506b605f Move \OCP\Encryption to PSR-4 (#24680) 2016-05-17 23:08:43 +02:00
Robin Appelman de5b7609f9 use mount providers to setup home storages (#24567) 2016-05-17 21:40:55 +02:00
Roeland Douma 7dbdf2f7e0 \OCP\DB to PSR-4 (#24650)
* Move \OCP\DB to PSR-4

* Fix PHP doc
2016-05-17 17:38:25 +02:00
Vincent Petry 379be91618 Merge pull request #24597 from owncloud/run-upgrade-in-incognito-mode
run upgrades in incognito mode
2016-05-17 16:14:11 +02:00
Roeland Douma 5c9103287f Group fixup (#24621)
* Move used OC_Group_xx to \OC\Group

* Add (deprecated) legacy wrapper in legacy, OC_Group_xx

* Replace deprecated use of OC_Group_xx with \OC\Group\xx
2016-05-17 16:06:44 +02:00
Roeland Douma 90a290afd8 Move \OCP\Diagnostics to PSR-4 (#24667) 2016-05-17 15:53:49 +02:00
Roeland Douma 499f0e487d Move \OCP\Authentication to PSR-4 (#24632) 2016-05-17 10:29:23 +02:00
Roeland Douma cbff3e0de7 Move \OCP\Console to PSR-4 (#24636) 2016-05-17 10:28:58 +02:00
Roeland Douma 15fdd36617 Move \OCP\Contacts to PSR-4 (#24645) 2016-05-17 10:22:21 +02:00
Jörn Friedrich Dreyer ca8d2e2f2e Merge pull request #24370 from owncloud/iclientservice-dicontainer
add IClientService to DI container
2016-05-17 09:33:54 +02:00
Jörn Friedrich Dreyer 5e03e9a843 Merge pull request #24083 from owncloud/fix-race-condition
Read only once
2016-05-17 09:03:57 +02:00
Jenkins for ownCloud c24a685ab5 [tx-robot] updated from transifex 2016-05-17 01:54:56 -04:00
Jenkins for ownCloud bafa02d312 [tx-robot] updated from transifex 2016-05-16 01:54:58 -04:00
Jenkins for ownCloud 7c28f62e20 [tx-robot] updated from transifex 2016-05-15 01:55:34 -04:00
Vincent Petry e383a9506d Merge pull request #24617 from owncloud/autoloader_no_private
our autoloader should not load classes in \OC
2016-05-13 17:30:10 +02:00
Vincent Petry 3db709d568 Merge pull request #24600 from owncloud/http-client-lazy-config
only configure the http client once we start using it
2016-05-13 16:10:24 +02:00
Vincent Petry 6938904b07 Merge pull request #24614 from owncloud/token-validation-log
don't spam the log file with failed token validation entries
2016-05-13 16:09:49 +02:00
Roeland Jago Douma a037c10c88
All \OC\ classes are handled by the composer autoloader 2016-05-13 11:11:01 +02:00
Roeland Jago Douma 5a5a5b2032
OC_xx all live in the legacy folder 2016-05-13 11:10:21 +02:00
Christoph Wurst ed01305e29
don't spam the log file with failed token validation entries 2016-05-13 09:53:50 +02:00
Roeland Jago Douma 05cc0dd478
Move \OC\Template to PSR-4 2016-05-13 08:54:07 +02:00
Roeland Jago Douma eb79b83831
Move functions.php to legacy
This file should really be properly namespaced etc!
2016-05-13 08:54:07 +02:00
Jenkins for ownCloud cba4875e4d [tx-robot] updated from transifex 2016-05-13 02:08:45 -04:00
Robin Appelman ea0f09a7ed only configure the http client once we start using it 2016-05-12 13:29:45 +02:00
Morris Jobke 9b3eefbf95 Merge pull request #24563 from owncloud/redis-factory
factor out redis configuration into it's own factory
2016-05-12 13:15:12 +02:00
Christoph Wurst 8b6bb0a426 Log user out correctly if max session lifetime is reached (#24552) 2016-05-12 12:09:13 +02:00
Christoph Wurst 3a1882b143
run upgrades in incognito mode 2016-05-12 11:56:58 +02:00
Roeland Douma 56f4c4bed9 Move \OCP\Comments to PSR-4 (#24565) 2016-05-12 09:48:11 +02:00
Roeland Douma 9b05f37fad lib/private/ocs to PSR-4 (#24558)
* Move OC_OCS_XX to legacy

* Move \OC\OCS to PSR-4

* OC_OCS_xx to \OC\OCS\xx

* Moved OC_OCS_xx to proper namespace
* OC_OCS_xx is still there for legacy reasons as a wrapper

* No calls to OC_OCS_xx in \OC\OCS\
2016-05-12 09:43:53 +02:00
Lukas Reschke 52add798d4 Do not automatically try to enable index.php-less URLs (#24539)
The current logic for mod_rewrite relies on the fact that people have properly configured ownCloud, basically it reads from the `overwrite.cli.ur
l` entry and then derives the `RewriteBase` from it.

This usually works. However, since the ownCloud packages seem to install themselves at `/owncloud` (because subfolders are cool or so…) _a lot_ of people have just created a new Virtual Host for it or have simply symlinked the path etc.

This means that `overwrite.cli.url` is wrong, which fails hard if it is used as RewriteBase since Apache does not know where it should serve files from. In the end the ownCloud instance will not be accessible anymore and users will be frustrated. Also some shared hosters like 1&1 (because using shared hosters is so awesome… ;-)) have somewhat dubious Apache configurations or use versions of mod_rewrite from the mediveal age. (because updating is money or so…)

Anyhow. This makes this explicitly an opt-in configuration flag. If `htaccess.RewriteBase` is set then it will configure index.php-less URLs, if
admins set that after installation and don't want to wait until the next ownCloud version they can run `occ maintenance:update:htaccess`.

For ownCloud 9.0 we also have to add a repair step to make sure that instances that already have a RewriteBase configured continue to use it by copying it into the config file. That way all existing URLs stay valid. That one is not in this PR since this is unneccessary in master.

Effectively this reduces another risk of breakage when updating from ownCloud 8 to ownCloud 9.

Fixes https://github.com/owncloud/core/issues/24525, https://github.com/owncloud/core/issues/24426 and probably some more.
2016-05-12 09:43:26 +02:00
Jenkins for ownCloud c5ae14453a [tx-robot] updated from transifex 2016-05-12 02:08:58 -04:00
Jörn Friedrich Dreyer e03f9e8103 allow configuration of memcached options (#23729)
* allow configuration of memcache options

Use production values for memcached as explained in http://apprize.info/php/scaling/15.html

The current implementiation uses ascii based serialization. This PR should reduce traffic to the memcached server.

cc @MorrisJobke @FelixBoehm

* add config sample

* merge config options, throw hint on config error

* fix typo

* fix config sample
2016-05-11 19:38:00 +02:00
Thomas Müller 8729415880 Merge pull request #24531 from owncloud/psr4-loading-for-install-and-commands
Correctly register PSR-4 autoloading before install.php and loading commands
2016-05-11 13:53:16 +02:00
Christoph Wurst 0486d750aa
use the UID for creating the session token, not the login name 2016-05-11 13:36:46 +02:00
Christoph Wurst 69dafd727d
delete the token in case an exception is thrown when decrypting the password 2016-05-11 13:36:46 +02:00
Christoph Wurst af707fba41
use the query builder instead of raw sql statements 2016-05-11 13:36:46 +02:00
Christoph Wurst 46bdf6ea2b
fix PHPDoc and other minor issues 2016-05-11 13:36:46 +02:00
Christoph Wurst a9b500c03b
catch possible SessionNotAvailableExceptions 2016-05-11 13:36:46 +02:00
Christoph Wurst f0f8bdd495
PHPDoc and other minor fixes 2016-05-11 13:36:46 +02:00
Christoph Wurst 699289cd26
pass in $request on OCS api 2016-05-11 13:36:46 +02:00
Christoph Wurst 168ccf90a6
try apache auth too 2016-05-11 13:36:46 +02:00
Christoph Wurst 8cc5f6036f
Fix existing tests 2016-05-11 13:36:46 +02:00
Christoph Wurst 7aa16e1559
fix setup 2016-05-11 13:36:46 +02:00
Christoph Wurst 7e7d5a2ef2
Add fallback to allow user:token basic auth 2016-05-11 13:36:46 +02:00
Christoph Wurst fdc2cd7554
Add token auth for OCS APIs 2016-05-11 13:36:46 +02:00
Christoph Wurst 8d48502187
Add index on 'last_activity'
add token type column and delete only temporary tokens in the background job

debounce token updates; fix wrong class import
2016-05-11 13:36:46 +02:00
Christoph Wurst 53636c73d6
Add controller to generate client tokens 2016-05-11 13:36:46 +02:00
Christoph Wurst 3ab922601a
Check if session token is valid and log user out if the check fails
* Update last_activity timestamp of the session token
* Check user backend credentials once in 5 minutes
2016-05-11 13:36:46 +02:00
Christoph Wurst 2fa5e0a24e
invalidate (delete) session token on logout
add 'last_activity' column to session tokens and delete old ones via a background job
2016-05-11 13:36:46 +02:00
Christoph Wurst d8cde414bd
token based auth
* Add InvalidTokenException
* add DefaultTokenMapper and use it to check if a auth token exists
* create new token for the browser session if none exists
hash stored token; save user agent
* encrypt login password when creating the token
2016-05-11 13:36:46 +02:00
Joas Schilling db16dc6644
Correctly register autoloading before install.php and loading commands 2016-05-11 11:18:00 +02:00
Thomas Müller f39e163d4a Merge pull request #24493 from owncloud/command_psr4
Move \OCP\Command to PSR-4
2016-05-11 11:17:19 +02:00
Thomas Müller 9eea062004 Merge pull request #24433 from owncloud/user_psr4
lib/private/user to PSR-4
2016-05-11 11:16:56 +02:00
Thomas Müller 199b447527
Yo-ho-oh - Murder all band 'o pirates 2016-05-11 09:16:17 +02:00
Jenkins for ownCloud 7da5331782 [tx-robot] updated from transifex 2016-05-11 01:55:55 -04:00
Lukas Reschke 4a05e9ce76 Merge pull request #24379 from owncloud/remove-unneeded-code
Remove unneeded private wrapper methods
2016-05-10 20:19:48 +02:00
Roeland Jago Douma 73b8158519
Move \OCP\Command to PSR-4 2016-05-10 20:14:04 +02:00
Roeland Jago Douma f6ee738ba8
Add \OC\User\Backend
Since some apps (ldap et al) still depend on OC_User_Backend this seemed
like the cleanest approach.
2016-05-10 19:53:36 +02:00
Roeland Jago Douma 9e1d9871a8
Move OC_User_Database to \OC\User\Database 2016-05-10 19:53:36 +02:00
Roeland Jago Douma 9504500e5f
Move \OC\User to PSR-4 2016-05-10 19:53:36 +02:00
Roeland Jago Douma c51ebb02fa
Move OC_User_XX to legacy folder 2016-05-10 19:53:36 +02:00
Roeland Jago Douma e74323ca90
Fix phpdoc 2016-05-10 12:43:35 +02:00
Lukas Reschke e8e72aa910 Merge pull request #24434 from owncloud/permalinks
Permalinks
2016-05-10 09:44:50 +02:00
Lukas Reschke 8b428d84c0
Make update server URL configurable
Currently testing the updates is a big problem and not really super easy possible. Since we now have a new updater server we should also make this configurable so that people can properly test updates.
2016-05-09 11:25:58 +02:00
Thomas Müller a502de0d28 Merge pull request #24419 from owncloud/allow-di-for-migration-steps
Allow migration steps to use automatic DI
2016-05-09 09:56:56 +02:00
Thomas Müller 2c76b9ba77 Merge pull request #24457 from JetUni/patch-1
Set higher timeout limit
2016-05-09 08:24:37 +02:00
Thomas Müller 50c5a750ee Merge pull request #24490 from owncloud/capability_psr4
Move \OCP\Capabilities to PSR-4
2016-05-09 08:24:10 +02:00
Jenkins for ownCloud 10e0fc0629 [tx-robot] updated from transifex 2016-05-09 02:08:23 -04:00
Roeland Jago Douma b6b35b55c7
Move \OCP\Capabilities to PSR-4 2016-05-09 07:30:56 +02:00
Thomas Müller 6b10693602 Merge pull request #24483 from owncloud/backgroundjob_psr4
Move \OCP\BackgroundJob to PSR-4
2016-05-09 07:22:46 +02:00
Jenkins for ownCloud 5d35844aff [tx-robot] updated from transifex 2016-05-08 01:54:53 -04:00
Roeland Jago Douma fd371700a2
Move \OCP\BackgroundJob to PSR-4 2016-05-07 12:15:59 +02:00
Morris Jobke d30fdb5f2d Merge pull request #24475 from owncloud/appframework_psr4
Move \OCP\AppFramework to PSR-4
2016-05-07 11:04:05 +02:00
Jenkins for ownCloud 956c3f2719 [tx-robot] updated from transifex 2016-05-07 01:54:56 -04:00
Roeland Jago Douma e47b186d51
Move \OCP\AppFramework to PSR-4 2016-05-06 20:38:34 +02:00
Vincent Petry caefe23bb6
Send permalink in internal share notification emails 2016-05-06 16:46:59 +02:00
Roeland Jago Douma ec8298c493
Move \OCP\App to PSR-4 2016-05-06 13:32:46 +02:00
Thomas Müller c9601efe95 Merge pull request #24455 from owncloud/activity_psr4
Move \OCP\Activity to PSR-4
2016-05-06 12:59:12 +02:00
Jenkins for ownCloud 6a95af0a4b [tx-robot] updated from transifex 2016-05-06 01:54:56 -04:00
Jarrett 482bfae123 Set higher timeout limit
Set the timeout limit to be 20 instead of 5 for machines that take longer to load the apps from apps.owncloud.org so that it doesn't show up blank.
2016-05-05 14:20:46 -06:00
Roeland Jago Douma 9185517bf0
Move \OCP\Activity to PSR-4 2016-05-05 20:25:08 +02:00
Jenkins for ownCloud 48be0b781a [tx-robot] updated from transifex 2016-05-05 01:55:08 -04:00
Morris Jobke 873849e843 Merge pull request #24432 from owncloud/issue-24270-never-save-app-language-into-request-lang
Do not save the language as request lang for apps when we didn't find…
2016-05-04 13:47:08 +02:00
Björn Schießle 61be98f554 Merge pull request #24410 from owncloud/fix_24182
first call the post_login hooks, before we call getUserFolder.
2016-05-04 10:23:38 +02:00
Joas Schilling 9fbb8ce302
Do not save the language as request lang for apps when we didn't find any 2016-05-04 08:28:13 +02:00
Jenkins for ownCloud cd7f4ed96f [tx-robot] updated from transifex 2016-05-04 02:11:59 -04:00
Roeland Douma b059aac143 Merge pull request #24411 from owncloud/share_psr4
Move \OC\Share to PSR-4
2016-05-04 07:47:52 +02:00
Robin Appelman e2f6aa3a57 factor out redis configuration into it's own factory 2016-05-03 16:02:17 +02:00
Thomas Müller 4b2544925f Merge pull request #23844 from owncloud/disable-user
Add occ commands to enable and disable a user + a disabled user can n…
2016-05-03 15:22:41 +02:00
Joas Schilling dda949e915
Allow migration steps to use automatic DI 2016-05-03 15:16:39 +02:00
Lukas Reschke df2eb96cc4 Merge pull request #24389 from owncloud/login-by-email
Allow login by email address
2016-05-03 13:44:38 +02:00
Roeland Jago Douma f90acb1b53
Move \OC\Share to PSR-4 2016-05-03 12:39:13 +02:00
Thomas Müller 06293783e0 Merge pull request #24387 from owncloud/locking-mark-reload-free
free up memory when releasing the last shared lock
2016-05-03 12:03:41 +02:00
Thomas Müller f8c04a4219 Merge pull request #24392 from owncloud/declare-cron-jobs-in-info.xml
Declare cron jobs in info.xml
2016-05-03 12:03:28 +02:00
Thomas Müller 15a479fb96 Merge pull request #24408 from owncloud/improve-server-container
Improve server container
2016-05-03 12:03:09 +02:00
Thomas Müller 66bc092724 Merge pull request #24405 from owncloud/user_db_capped_cache
Use a CappedCache in the user database backend
2016-05-03 11:54:21 +02:00
Björn Schießle 8c0984d605
first call the post_login hooks, before we call getUserFolder.
The login process needs to be completed before we can safely create
the users home folder. For example we need to give encryption a chance
to initialize the users encryption keys in order to copy the skeleton
files correctly
2016-05-03 10:46:05 +02:00
Joas Schilling 61ce4f4ef3
Add methods to public interface 2016-05-03 10:30:15 +02:00
Joas Schilling 6ab004fac1
Fix doc block 2016-05-03 10:30:07 +02:00
Joas Schilling 1e5f85ac8c
Use internal tag so IDEs highlight the usage 2016-05-03 10:29:47 +02:00
Roeland Jago Douma 5ba6fe2983
Use a CappedCache in the user database backend
When running with a user database backend on large installations the
cache can grow to significant sizes. This can be especially problematic
when running big cron/repair jobs.
2016-05-03 09:29:22 +02:00
Thomas Müller 71fa0a75bf
Allow declaration of background jobs in info.xml 2016-05-03 08:58:12 +02:00
Roeland Jago Douma 03f1a270cc
Move \OC\Log to PSR-4 2016-05-03 08:57:26 +02:00
Roeland Jago Douma fc82047e26
Move OC_Log_xx to \OC\Log namespace 2016-05-03 08:57:26 +02:00
Lukas Reschke adf7e7295e Merge pull request #24375 from owncloud/archive_move
Move OC_Archive to \OC\Archive and PSR-4
2016-05-03 08:37:01 +02:00
Morris Jobke a72e6a2dac Merge pull request #24386 from owncloud/psr4-for-apps
PSR-4 for apps
2016-05-03 08:24:22 +02:00
Roeland Douma ed3b9d5aff Merge pull request #24381 from owncloud/correc_typehint
Use correct typehint for the IProviderFactory
2016-05-03 07:40:25 +02:00
Roeland Douma c87bd0432a Merge pull request #24380 from owncloud/move-activity-manager-to-namespace
Move activity manager to the namespace
2016-05-03 07:40:04 +02:00
Roeland Jago Douma c96ed5c4ce
Move OC_Archive to \OC\Archive\Archive
* Move out of legacy folder
* Move to proper namespace
* Fix calling code
2016-05-02 19:34:32 +02:00
Roeland Jago Douma 0cb434686c
Move OC_Archive_XX to PSR-4
* Fix code
* Fix tests
2016-05-02 19:32:51 +02:00
Thomas Müller 05cf552f66 Merge pull request #24322 from owncloud/install-and-uninstall-repair-steps
Adding repair steps for install and uninstall
2016-05-02 17:50:29 +02:00
Roeland Douma b84825f030 Merge pull request #24229 from owncloud/session-id-wrapper
add ISession::getId() wrapper for session_id
2016-05-02 16:49:38 +02:00
Joas Schilling d879354ccb
Use lib/ instead of src/ because that is what people are used to 2016-05-02 15:45:52 +02:00
Joas Schilling ee3457aec0
Register the PSR-4 path on loadApp 2016-05-02 15:17:14 +02:00
Thomas Müller 7aca13f14c
Allow login by email address 2016-05-02 14:51:01 +02:00
Thomas Müller fd844f3eb3 Merge pull request #24336 from owncloud/issue-24328-remove-password-from-exception-trace-in-dav-auth
Remove the password from the validateUserPass() method as well
2016-05-02 14:33:07 +02:00
Thomas Müller b10dcfc3b7
Fixing local event delivery for calendar events based on the email address 2016-05-02 14:20:59 +02:00
Robin Appelman 9677681a37 free up memory when releasing the last shared lock 2016-05-02 14:18:46 +02:00
Joas Schilling 8668560352
Keep the composer instance so we can add psr4 paths later 2016-05-02 14:10:53 +02:00
Thomas Müller d7eb17bdc0 Merge pull request #24327 from owncloud/better-callForAllUsers-performance
Better callForAllUsers memory usage
2016-05-02 13:12:43 +02:00
Roeland Jago Douma eb1d5fdaf8
Use correct typehint 2016-05-02 11:59:54 +02:00
Joas Schilling 7bfc617b03
Move activity manager to the namespace 2016-05-02 11:57:24 +02:00
Lukas Reschke f81b57bc45
Read only once
This can lead to race conditions otherwise. Also depracted hasKey
2016-05-02 11:31:57 +02:00
Morris Jobke 5595e038ae
Remove unneeded private wrapper methods 2016-05-02 11:23:14 +02:00
Joas Schilling 3397e27657
Remove the password from the validateUserPass() method as well 2016-05-02 10:44:09 +02:00
Morris Jobke 6b12f96b14 Merge pull request #24341 from owncloud/scan-nfd-showwarning
Add files:scan warning when NFD or incompatible encoding found
2016-05-02 09:41:12 +02:00
Roeland Jago Douma 9b875db8b8
OCS API should catch LoginExceptions
Catching the login exception and returning false (login failed). Makes
the OCS API properly return data instead of printing the exception page.
2016-05-02 09:31:22 +02:00
Thomas Müller 9c9fec36dd
Add occ commands to enable and disable a user + a disabled user can no longer login - fixes #23838 2016-05-02 09:31:22 +02:00
Thomas Müller 5e055ca6c1
Move uninstall repair step execution to the correct place 2016-05-02 09:22:26 +02:00
Thomas Müller b0211a54c4
Repair steps no longer implement the Emitter interface 2016-05-02 09:17:20 +02:00
Thomas Müller f91e5f87d2
Fix installer file location 2016-05-02 09:06:19 +02:00
Thomas Müller e049953d1a
OC_Installer -> \OC\Installer 2016-05-02 08:52:06 +02:00
Thomas Müller 54f45f95f5
Adding repair steps for install and uninstall - fixes #24306 2016-05-02 08:52:06 +02:00
Jenkins for ownCloud a323111bd1 [tx-robot] updated from transifex 2016-05-02 02:08:49 -04:00
Roeland Jago Douma e68ca8695d
Move lonely file from \OC\Files to PSR-4
Conflicting PR probabaly caused this
2016-05-01 19:40:55 +02:00
Christoph Wurst 13883d2d57
add IClientService to DI container 2016-05-01 15:08:56 +02:00