Commit graph

36 commits

Author SHA1 Message Date
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
c0a02f1615 Verify CSRF token already in update.php and not the EventSource code
Issue report:
> Hum, well I upgraded the package then visited the web interface to
trigger the update and it failed; the UI would say there was a
possible CSRF attack and after that it'd be stuck in maintenance mode.
Tried a few times (by editing maintenance to false in owncloud.conf)
and same result each time.

That smells partially like an issue caused by our EventSource implementation, due to legacy concerns the CSRF verification happens within the EventSource handling and not when the actual endpoint is called, what happens here then is:

1. User has somehow an invalid CSRF token in session (or none at all)
2. User clicks the update button
3. Invalid CSRF token is sent to update.php - no CSRF check there => Instance gets set in maintenance mode
4. Invalid CSRF token is processed by the EventSource code => Code Execution is stopped and ownCloud is stuck in maintenance mode

I have a work-around for this problem, basically it verifies the CSRF token already in step 3 and cancels execution then. The same error will be shown to the user however he can work around it by refreshing the page – as stated by the error. I think that’s an acceptable behaviour for now: INSERT LINK

To verify this test:

1. Delete your ownCloud cookies
2. Increment the version in version.php
3. Try to upgrade
=> Before the patch: Instance shows an error, is set to upgrade mode and a refresh does not help
=> After the patch: Instance shows an error, a refresh helps though.

This is not really the best fix as a better solution would be to catch such situations when bootstrapping ownCloud, however, I don’t dare to touch base.php for this sake only, you never know what breaks then…

That said: There might be other bugs as well, especially the stacktrace is somewhat confusing but then again it installing ownCloud under /usr/share/owncloud/ and I bet that is part of the whole issue ;-)
2015-03-09 10:07:30 +01:00
Vincent Petry
22bc37cb82 Properly forward repair errors and warnings
This makes repair errors and warnings visible for the user when
upgrading on the command line or in the web UI.
2015-02-27 12:44:04 +01:00
Morris Jobke
06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Thomas Müller
bbf7f56f94 3rd-party apps are disabled on upgrade - refs #14026 2015-02-24 12:02:36 +01:00
Jenkins for ownCloud
6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Victor Dubiniuk
c9fd3c9d29 Inject config 2014-12-10 01:13:38 +03:00
Victor Dubiniuk
303fce44f4 Use httphelper and cache response even when it empty 2014-12-06 20:17:47 +03:00
Lukas Reschke
70abce0482 Merge pull request #10739 from owncloud/eventsource-public
Add EventSource to the public API
2014-09-08 18:46:27 +02:00
Robin Appelman
fa3393674c Better phpdoc and method naming 2014-09-04 13:26:51 +02:00
Robin Appelman
65608d7c92 Use the public api to get event sources 2014-09-03 13:36:15 +02:00
Vincent Petry
e05b95636b Fix upgrade process when apps enabled for specific groups
Fix issue where the currently logged user was causing side-effects when
upgrading.
Now setting incognito mode (no user) on update to make sure the whole
apps list is taken into account with getEnabledApps() or isEnabled().
2014-09-02 17:16:14 +02:00
Lukas Reschke
4aca46046b Add require_once to update.php due to routing
Fixes https://github.com/owncloud/core/issues/10585
Partially reverts 52d5429768
2014-08-22 11:39:05 +02:00
blizzz
52d5429768 Merge pull request #10522 from owncloud/removeLoadAppScript
Remove loadAppScriptFile
2014-08-21 19:59:31 +02:00
Lukas Reschke
ab12bd292d Add update route to core 2014-08-19 15:40:08 +02:00
Robin Appelman
3184983565 Send feedback from upgrading apps to the upgrade ui 2014-08-04 13:41:05 +02:00
Vincent Petry
5b97369b00 Simulate apps database schema update on upgrade
When upgrade, also simulate the database schema update for apps before
doing the actual upgrade.
2014-06-04 17:16:44 +02:00
Vincent Petry
02f682b156 Now showing disabled apps as upgrade status line
- Added app id in update overview.
- Added status message for disabled app for CLI upgrade and web upgrade
2014-05-27 15:20:33 +02:00
Thomas Müller
6ff96b34ad Merge branch 'master' into load-apps-proper-master
Conflicts:
	apps/files/ajax/rawlist.php
	cron.php
	ocs/v1.php
2014-03-21 14:05:08 +01:00
Thomas Müller
6b9ae27b90 drop file cache migration OC5 -> OC6 2014-03-18 17:14:38 +01:00
Thomas Müller
0db5fead8e remove some more global variable $RUNTIME_NOAPPS 2014-02-06 10:04:18 +01:00
Thomas Müller
9909b8b726 adding translations to update events 2013-08-27 00:26:44 +02:00
Robin Appelman
58f473d734 split upgrade logic from ajax file 2013-07-06 17:00:00 +02:00
Michael Gapczynski
4687f50e75 Add undefined verision variables 2013-05-17 11:15:53 -04:00
Bart Visscher
ff64c87adb Connect watcher failure function to the failure signal 2013-05-04 00:07:30 +02:00
Bart Visscher
41f7eb948a Move start of the maintenance mode to the ajax call
Make sure the update page is shown in a browser. And not an ajax request
2013-05-04 00:05:29 +02:00
Arthur Schiwon
e25c1f3130 port 22c8194cc8 2013-04-02 21:03:13 +02:00
root
7f74f08808 Add missing backticks.
Especially at user without "" PostgreSQL likes to fail.
2013-03-30 23:52:26 +01:00
Arthur Schiwon
18554059a4 Remove Debug output 2013-03-27 19:12:53 +01:00
Arthur Schiwon
e2afd0cb42 Upgrade FileCache on ownCloud upgrade for all users with files 2013-03-27 19:12:28 +01:00
Michael Gapczynski
5300d6ad55 Clear the CSS and JS cache earlier to make sure update goes smoothly 2013-03-05 21:13:07 -05:00
Robin Appelman
47b899e0c8 Disable prepared query caching while doing an upgrade 2013-02-26 22:41:48 +01:00
Michael Gapczynski
f6426cee04 Tweak failure message and throw exceptions from updateDbFromStructure() 2013-01-05 12:13:36 -05:00
Michael Gapczynski
6b2216f0d6 Remove old data directory protection from update, should already have taken place or not working because the server isn't Apache 2013-01-05 11:09:48 -05:00
Michael Gapczynski
e7eea3dd2e Use hooks to send updates from apps 2013-01-04 10:21:33 -05:00
Michael Gapczynski
7505837079 Basic update progress of database update only 2013-01-03 21:32:33 -05:00