Go to file
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
.idea Add newline that was removed by 15be763d46 2014-12-10 09:38:32 +01:00
3rdparty@322e9ce44a update 3rdparty to current master 2015-02-26 15:11:03 +01:00
apps Merge pull request #14706 from owncloud/ldap-reset-paged-search-on-null-limit 2015-03-09 08:12:25 +01:00
build Make sure we use Jasmine 2 for running JS unit tests 2015-03-04 13:50:59 +01:00
config Refactor \OC\Memcache\Factory 2015-03-05 11:36:34 +00:00
core Verify CSRF token already in update.php and not the EventSource code 2015-03-09 10:07:30 +01:00
l10n Correctly create the expected key for plurals with quotes 2015-02-18 13:22:06 +01:00
lib [tx-robot] updated from transifex 2015-03-09 01:54:36 -04:00
ocs Revert "Updating license headers" 2015-02-26 11:37:37 +01:00
settings [tx-robot] updated from transifex 2015-03-09 01:54:36 -04:00
tests Merge pull request #13368 from owncloud/memcache_lowlatency 2015-03-05 13:05:17 +01:00
themes Gitorious => Github 2012-08-26 02:39:42 +03:00
.bowerrc ability to add bower resources 2014-11-03 20:54:40 +01:00
.gitignore Better cleanup in autotest.sh 2015-01-28 15:06:18 +00:00
.gitmodules use https as submodule url 2014-03-21 19:38:22 +01:00
.htaccess Let users configure security headers in their Webserver 2015-03-02 19:07:46 +01:00
.jshintrc enable laxbreak option in jshintrc to comply with our coding guide lines 2014-11-04 12:51:54 +01:00
.mailmap Adding .mailmap - helps to add unified authors to the license header 2015-02-22 20:36:36 +00:00
.scrutinizer.yml bower jquery-ui - exported changes to a separate css file 2014-12-13 09:47:34 +01:00
.tag Add .tag file to make tar balls tracable 2014-06-14 17:40:32 +02:00
.user.ini Use "off" and "off" instead of true booleans 2015-02-23 09:40:15 +01:00
AUTHORS Add myself as author 2014-09-19 17:24:12 +02:00
CONTRIBUTING.md add documentation issue trackers and use https everywhere 2015-02-18 19:13:49 +01:00
COPYING-AGPL Really add AGPL file 2011-02-09 15:12:09 +00:00
COPYING-README correct icon license, we use Elementary icons, not Silk anymore 2014-07-15 11:35:49 +02:00
README.md Adding dependency labels 2015-03-02 20:56:35 +01:00
autotest-external.sh fix files external test run and add common-tests option 2015-02-26 13:32:44 +01:00
autotest-hhvm.sh Better cleanup in autotest.sh 2015-01-28 15:06:18 +00:00
autotest-js.sh remove 'set -e' - causes issues during ci execution 2014-09-12 15:42:50 +02:00
autotest.cmd Restore the development config after running the tests 2014-12-02 12:41:33 +01:00
autotest.sh Better cleanup in autotest.sh 2015-01-28 15:06:18 +00:00
bower.json bump jquery.strengthify to 0.4.1 2015-01-06 13:48:58 +01:00
buildjsdocs.sh Added script to build the JS documentation 2014-10-31 13:27:36 +01:00
console.php Don't swallow errors in console.php 2015-02-28 12:31:11 +01:00
cron.php Revert "Updating license headers" 2015-02-26 11:37:37 +01:00
db_structure.xml set max argument length to 4000 2015-02-25 15:09:41 +01:00
index.html Try to prefer index.php over index.html in the same directory 2013-04-24 15:11:53 +02:00
index.php Revert "Updating license headers" 2015-02-26 11:37:37 +01:00
indie.json add indie.json for Indie App Store listing 2014-06-29 22:03:24 +02:00
issue_template.md Merge pull request #10830 from Finkregh/patch-1 2015-02-24 12:13:55 +01:00
occ Use a more universal shebang 2014-11-19 17:34:03 +01:00
public.php Revert "Updating license headers" 2015-02-26 11:37:37 +01:00
remote.php Revert "Updating license headers" 2015-02-26 11:37:37 +01:00
robots.txt Add robot.txt 2013-01-28 16:39:53 -06:00
status.php Revert "Updating license headers" 2015-02-26 11:37:37 +01:00
version.php This is not 8.1 pre alpha 2015-02-28 00:26:31 +01:00

README.md

ownCloud

ownCloud gives you freedom and control over your own data. A personal cloud which runs on your own server.

Build Status on Jenkins CI

Git master: Build Status

Quality:

  • Scrutinizer: Scrutinizer Quality Score
  • CodeClimate: Code Climate

Depencencies:

Dependency Status

Dependency Status

Installation instructions

https://doc.owncloud.org/server/8.0/developer_manual/app/index.html

Contribution Guidelines

https://owncloud.org/contribute/

Get in touch

Important notice on translations

Please submit translations via Transifex: https://www.transifex.com/projects/p/owncloud/

Transifex

For more detailed information about translations: http://doc.owncloud.org/server/8.0/developer_manual/core/translation.html