Commit Graph

844 Commits

Author SHA1 Message Date
Lukas Reschke 5588c5f262 Delete cookie instead of emptying value
PHP will handle session cookies with an empty values as an E_WARNING error. ([php/#68063](https://bugs.php.net/bug.php?id=68063))

ownCloud sets the cookie to an empty value in case the session expires, it however after this starts a new session. Due to potential race conditions this can in unlikely cases lead to the fact that the session never gets restarted and the user is left with an empty cookie. PHP tries then to use the empty cookie which makes the instance not usable.

To work around any race condition we now tell PHP to explicitly delete the value which can be done by using `null` as value, PHP will then send a cookie with the value "deleted". Also theepiration has been set to -1.
2015-10-19 19:54:12 +02:00
Joas Schilling 13dd62f7b0 Make sure that remote shares use the correct uid casing 2015-10-06 15:16:19 +02:00
Morris Jobke b945d71384 update licence headers via script 2015-10-05 21:15:52 +02:00
Individual IT Services fbe43e6a26 cache result of \OCP\Util::needUpgrade()
reduce calls of \OCP\Util::needUpgrade()
where \OCP\Util::needUpgrade() is called we can call as well
self::checkUpgrade and use the cached result
In line 877 the call way unnecessary anyway because of the first part of
the if statement

move caching to \OCP\Util::needUpgrade

renaming variable

fixing testNeedUpgradeCore()

cache result of checkUpgrade() in self::$needUpgrade

reduce calls of \OCP\Util::needUpgrade()
where \OCP\Util::needUpgrade() is called we can call as well
self::checkUpgrade and use the cached result
In line 877 the call way unnecessary anyway because of the first part of
the if statement

move caching to \OCP\Util::needUpgrade

renaming variable

fixing testNeedUpgradeCore()

fix typo in variable name

deleting tabs
2015-09-29 15:34:42 +02:00
Thomas Müller 68bf4440d3 Merge pull request #19293 from owncloud/individual-it-move_initTemplate
[jenkins] do not load unnecessary code in case of webdav
2015-09-25 13:49:51 +02:00
Thomas Müller e7bc2a10e3 Merge pull request #15098 from owncloud/fix_preview_versions_revert_issue
fix issue with version rollback and thumbnails
2015-09-24 21:06:27 +02:00
Individual IT Services bf1cb20e90 do not load unnecessary code in case of webdav
changing from "protected static" to "protected"
as suggested by @nickvergessen
https://github.com/owncloud/core/pull/19114#discussion_r39719851

moving initTemplate() into template constr.

reduce to move initTemplate only

cleanup spaces
2015-09-23 11:57:10 +02:00
Phil Davis a165710e99 Minor text typos
that I noticed while looking at some code.
2015-09-21 23:04:25 +05:45
Georg Ehrke b3ff773bbf delete cached preview when rolling back file's version
add random number using OC.parseQueryString and _.extend()

version rollback: add missing prefix to OC\Preview::post_delete

add test to assure that the rollback hook is called
2015-09-20 11:22:40 +02:00
Thomas Müller decdaf0018 Merge pull request #19024 from owncloud/remove-get_temp_dir
Remove get_temp_dir()
2015-09-15 14:18:29 +02:00
Robin McCorkell f8619870ea Remove get_temp_dir() 2015-09-15 11:33:25 +02:00
Lukas Reschke 65ebba44ce Allow /tests folder in autoloader by default
Given the fact that "/tests" is not shipped by default and this has broken some applications and frustrated quite some people we should add "/tests" to the default allowed autoloading set.

I do consider the security impact marginally since the /tests folder is not shipped within the release as well as usually has a hard requirement on being called by phpunit.
2015-09-15 11:32:07 +02:00
Frank Karlitschek 7562e4959b Merge pull request #18658 from owncloud/configurable-temp
Configurable temporary directory
2015-09-12 22:04:41 +02:00
Robin McCorkell b3acf09c60 Only add valid root for enabled apps 2015-09-05 00:04:58 +01:00
Individual IT Services 3bc287ff63 Merge pull request #18794 from individual-it/reuse_systemConfig
reuse existing $systemConfig variable
2015-09-04 14:03:56 +05:45
Morris Jobke 038b09b0b0 Proper details about git submodule update
* fixes #18801
2015-09-03 14:55:26 +02:00
Individual IT Services cd0a5372ee reuse existing $systemConfig variable 2015-09-03 12:44:35 +05:45
Robin Appelman e9b91b1798 verify the path in the autoloader 2015-09-01 15:03:28 +02:00
root acae208f2f moved code to /lib/private/tempmanager.php
fix for unit test

some fixes
2015-08-29 16:59:02 +01:00
Morris Jobke e88b380973 Remove DEBUG constant and use config value
* introduces config.php option 'debug' that defaults to false
* migrate DEBUG constant to config value
2015-08-24 15:14:05 +02:00
Morris Jobke b3495a1dc9 Merge pull request #18482 from owncloud/encrypt-session-data
Add a session wrapper to encrypt the data before storing it on disk
2015-08-24 12:10:15 +02:00
Morris Jobke 40b1054530 Merge pull request #18254 from owncloud/mitigate-breach
Add mitigation against BREACH
2015-08-24 09:14:27 +02:00
Joas Schilling 36eef2ddab Add a session wrapper to encrypt the data before storing it on disk 2015-08-21 17:59:23 +02:00
Morris Jobke 06d8edd963 Merge pull request #17434 from owncloud/update-showappnameonappupdate
Display app names in update page for app updates
2015-08-20 11:50:01 +02:00
Vincent Petry a2674b2b30 Additions to update page
Apps to update and to disable will always be shown.
Main title changes only when apps need updated, not core.
Added bullet style.
Exclude incompatible apps from updated apps list.
2015-08-20 11:14:30 +02:00
Vincent Petry b919ae96f0 Display app names in update page for app updates
Whenever the update page is displayed for apps, show app names instead
of the core update text.
2015-08-19 18:03:35 +02:00
Lukas Reschke 8313a3fcb3 Add mitigation against BREACH
While BREACH requires the following three factors to be effectively exploitable we should add another mitigation:

1. Application must support HTTP compression
2. Response most reflect user-controlled input
3. Response should contain sensitive data

Especially part 2 is with ownCloud not really given since user-input is usually only echoed if a CSRF token has been passed.

To reduce the risk even further it is however sensible to encrypt the CSRF token with a shared secret. Since this will change on every request an attack such as BREACH is not feasible anymore against the CSRF token at least.
2015-08-14 01:31:32 +02:00
Arthur Schiwon ffaf5fed0e load backbone universally 2015-08-06 12:27:18 +02:00
Thomas Müller c3cac887f5 - more injection
- less static calls
- use params on sql queries
- handle sql exception on database and user creation gracefully
2015-07-30 00:04:30 +02:00
Morris Jobke 5265a44260 Remove commented code 2015-07-24 00:47:41 +02:00
Bernhard Posselt 582f07950f Merge pull request #17075 from owncloud/bootstrap-tooltip
Replace jQuery tipsy with bootstrap tooltip
2015-07-23 19:25:09 +02:00
Morris Jobke 2d691c2fb4 Merge pull request #17381 from owncloud/fix_sharing_add_to_group
[sharing] fix addToGroup hook
2015-07-21 13:30:41 +02:00
Bjoern Schiessle 058d910f5e intproduce pre_addToGroup hook. we need to calculate the possible unique
targets before the user was added to the group otherwise we will always detect
a name collision
2015-07-06 17:24:05 +02:00
Roeland Jago Douma c8145cdbd6 Javascript mimetype icon resolver
This makes it possible to retrieve the icon for mimetypes in javascript.
It makes no additional queries to the server to retrieve the mimetype.

* config/mimetypealiases.json added
* mimetype.js: this is where the logic resides to convert from mimetype
  to icon url
* mimetypelist.js: generated file with a list of mimetype mapping (aliases)
  and the list of icon files
* ./occ maintenance:mimetypesjs : new command for occ to gernerate
  mimetypes.js
* unit tests updated and still work
* javascript tests added
* theming support
* folder of the theme is now present in javascript (OC.theme.folder)
2015-07-06 16:32:10 +02:00
Thomas Müller d3ac73c0c9 Remove OC_Log 2015-07-03 18:00:16 +02:00
Vincent Petry 2fe677d0ed Catch cache garbage collection exception on postLogin
Just log the exception instead of preventing access to OC.
2015-06-30 17:36:55 +02:00
Morris Jobke f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Hendrik Leppelsack 8621d176db moved tooltip.js to vendor scripts 2015-06-22 15:38:32 +02:00
Hendrik Leppelsack f66e9af9a0 replaced tipsy with bootstrap tooltip 2015-06-22 13:32:06 +02:00
Thomas Müller 97a3d8c313 Fix login handler for file cache - fixes #16795 2015-06-08 14:13:38 +02:00
Thomas Müller 5e60795962 Bring back OC\Cache\File - fixes #16760 2015-06-05 14:21:17 +02:00
Morris Jobke cf2c599218 Merge pull request #16200 from owncloud/kill-globalfilecache
Drop file caching
2015-06-02 09:11:33 +02:00
Robin Appelman e08423f956 release all locks on shutdown 2015-06-01 13:22:56 +02:00
Georg Ehrke 745c3c64fa fix preview hooks, enable_previews default is true 2015-05-13 19:59:41 +02:00
Arthur Schiwon e016ed55ff also free joblist and base from file cache code 2015-05-12 17:44:31 +02:00
Bjoern Schiessle 0d5c7a11e2 use hooks to update encryption keys instead of the storage wrapper if a file gets renamed/restored, as long as we
are in the storage wrapper the file cache isn't up-to-date
2015-05-11 12:06:57 +02:00
Hugo Gonzalez Labrador 3e647afbd4 Do not trigger preview hooks if enable_previews is false 2015-05-06 10:39:48 +02:00
Hugo Gonzalez Labrador 3a3a58f248 Do not trigger preview hooks if enable_previews is false 2015-05-06 10:03:18 +02:00
Lukas Reschke 9530e819eb Don't display errors and log them
Fixes https://github.com/owncloud/core/issues/16014
2015-05-05 12:34:22 +02:00
Lukas Reschke 8a85d8bc17 Try to set required ini values in base.php
Fixes https://github.com/owncloud/core/issues/16006
2015-05-03 13:23:29 +02:00