Commit Graph

298 Commits

Author SHA1 Message Date
Morris Jobke 2b898bd82c Revert "cache the storage info for 5 min" 2017-02-16 11:58:45 -06:00
Lukas Reschke cf582a6d14 Merge pull request #3439 from nextcloud/oc-26963
Make sure invalid images don't flood the log file
2017-02-16 16:34:18 +01:00
Lukas Reschke 92c74d2f9a
Don't force displayname if backend already provides one
`\OC_User::loginWithApache` is used in combination with backend mechanisms like our SSO / SAML integration. Those can optionally already provide a displayname using other means. For example by mapping SAML attributes.

The current approach makes it however impossible for backends using `\OCP\Authentication\IApacheBackend` to set a displayname on their own. Because the display name will simply be overwritten with the loginname.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-02-16 13:55:48 +01:00
Morris Jobke 200a28255e
Always enable avatars
* we introduced this setting in the begining because our
  avatar support caused some performance issues, but we
  fixed them and should only provide one way how Nextcloud
  looks

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-13 17:53:33 -06:00
Victor Dubiniuk 2585f195da
Check if color exists in palette before using it
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-02-10 16:27:51 +01:00
Joas Schilling 69046c6662
Make sure invalid images don't flood the log file
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-02-10 13:44:16 +01:00
Morris Jobke 5bad417e57 Merge pull request #2044 from nextcloud/login-credential-store
Login credential store
2017-01-30 19:30:04 -06:00
Robin Appelman f55260bc83 Merge pull request #3214 from nextcloud/cache-storage-info
cache the storage info for 5 min
2017-01-24 13:49:45 +01:00
Robin Appelman cbc18b7c8b
hash the path used for the cache key to prevent key length problems
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-24 11:18:05 +01:00
Robin Appelman e38a978623
cache the storage info for 5 min
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-23 14:52:50 +01:00
Vincent Petry 0aaf209c66
Prevent PHP request to get killed when using fclose callback (#26775)
* Prevent PHP request to get killed when using fclose callback

* Add ignore_user_abort everywhere where the time limit is set to 0

Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-23 12:33:20 +01:00
Joas Schilling fcfb4205bc
Fix tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-13 18:33:43 +01:00
Joas Schilling 587eca3ccd
Remove the magic parsing of the description
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-13 18:33:42 +01:00
Christoph Wurst 140555b786
always allow remembered login
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2017-01-11 19:20:11 +01:00
Joas Schilling ec4b0d1e84
Remove group restrictions when those are not allowed anymore
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-04 10:40:14 +01:00
Lukas Reschke 91c87d3a7a Merge pull request #2820 from nextcloud/testing-md5home
Testing md5home (#26854)
2016-12-23 12:22:15 +01:00
Morris Jobke 44052210a2
Only show version in settings - do not list channel
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-12-22 14:19:29 +01:00
Vincent Petry b32e252fb0
Testing md5home (#26854)
* Allow clearing default user backends in config.php

When specifying "user_backends" in config.php, a new option "default"
when set to false will prevent the default user backend to be
registered. The default one is the database backend.
This makes it possible to select exclusive user backends from apps.

* Testing app provides test user backend for alternative homes

The backend provide md5 result to getHome()

* Only md5 the user home when it's not the admin

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-22 11:03:42 +01:00
Lukas Reschke 32bf8ec826
Don't use cached informations for app version
When installing an app from the appstore the `\OC_App::getAppVersion` code is triggered twice:

- First when the downloader tries to compare the current version to the new version on the appstore to check if there is a newer version. This protects against downgrade attacks and is implemented in `\OC\Installer::downloadApp`.
- Second, when the app is actually installed the current version is written to the database. (`\OC\Installer::installApp`)

This fails however when the version is actually cached. Because in step 1 the cached version will be set to "0" and then be reused in the second step.

While this is probably not the cleanest version I assume this is an approach that is least invasive. Feedback and suggestions welcome :)

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-09 18:01:45 +01:00
Felix A. Epp 98bdef8d83 Cahnge URL for desktop clients directly to pop-up
by adding `/#install-clients` to the URL

Signed-off-by: Felix A. Epp <work@felixepp.de>
2016-12-08 12:40:52 +01:00
Morris Jobke a2867c0664
Properly check the data dir
* fixes #1364

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-12-05 23:35:35 +01:00
Morris Jobke d86b29b42b Merge pull request #2066 from nextcloud/fix-redirect-double-encoding
do not double encode the redirect url
2016-11-29 17:21:43 +01:00
Morris Jobke 734dd3a2e6
Use correct channel information
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-11-29 11:29:43 +01:00
Joas Schilling d2ff6c569e
Keep the filemtime for files when downloading them in a zip/tar
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-28 11:36:10 +01:00
John Molakvoæ (skjnldsv) 9528045178
Add jquery ui fixes js file
+ fix autocomplete width (fix #2324)

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2016-11-25 16:44:51 +01:00
Lukas Reschke 7eaaffeee0
Update link to the docs to 11
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-11-22 13:29:24 +01:00
Robin Appelman 58685413d2
fix white screen of death in maintenance mode when theming is disabled
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-11-21 13:10:55 +01:00
Felix Epp 1614b310ef Add system config htaccess.IgnoreFrontController for prettyURLs w/o mod_env
Added the system config which sets all conditions to true that query the
FrontControllerActive mod_env variable.

Signed-off-by: Felix A. Epp <work@felixepp.de>
2016-11-16 22:28:49 +01:00
Morris Jobke 43e22f4da4
Add autoloader path for newly installed apps too
* followup to https://github.com/nextcloud/server/pull/2148
* problem noticed in https://github.com/nextcloud/files_antivirus/pull/11

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-11-16 12:55:34 +01:00
Roeland Jago Douma d03446a0ae Merge pull request #2148 from nextcloud/add_autoloader_before_enabling
Add autoloader before enabling apps
2016-11-16 12:09:39 +01:00
Joas Schilling b2248efd75
Allow to register Providers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-16 09:25:45 +01:00
Joas Schilling 13ff56bfc5
Allow to register settings/types via info.xml
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-16 09:25:44 +01:00
Joas Schilling 280d5325c7
Allow to register activity filters via info.xml
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-16 09:25:40 +01:00
Morris Jobke 3c00ff2616 Merge pull request #2145 from nextcloud/docs_to_com
docs are on nc.com
2016-11-16 00:57:35 +01:00
Roeland Jago Douma d826e04757
Add autoloader before enabling apps
Else apps that require already autoloading in the installer
(files_antivius) die hard!

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-15 22:28:57 +01:00
Roeland Jago Douma 39f336035b
docs are on nc.com
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-15 19:17:42 +01:00
Roeland Jago Douma 7a8bf6ea26
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-15 18:10:17 +01:00
Roeland Jago Douma 028c668293
Do not cache version info in the sessions
If the session is cleared and closed for whatever reason the loadVersion
will write to the session anyways. This will lead to an exception.

This should fix #1303

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-15 17:53:12 +01:00
Thomas Müller 895b638a2c
We need to ensure that the app holding the objectstore implementation is loaded - fixes owncloud/objectstore#38 2016-11-14 15:00:45 +01:00
Christoph Wurst 0ebffa4a5f do not double encode the redirect url
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-09 16:14:46 +01:00
Joas Schilling 9296038d78
Fix preview URLs
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-08 16:39:13 +01:00
Morris Jobke e6b52ef4cd Merge pull request #1347 from nextcloud/bring-back-remember-me
fix remember me login
2016-11-02 18:32:38 +01:00
Christoph Wurst d907666232
bring back remember-me
* try to reuse the old session token for remember me login
* decrypt/encrypt token password and set the session id accordingly
* create remember-me cookies only if checkbox is checked and 2fa solved
* adjust db token cleanup to store remembered tokens longer
* adjust unit tests

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2016-11-02 13:39:16 +01:00
Lukas Reschke d805df7bb3
Use findAppInDirectories
The other function doesn't work if the appstore is disabled

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-31 17:30:02 +01:00
Lukas Reschke 8acb54aa0b
Add update support
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-31 17:17:47 +01:00
Lukas Reschke df7fd2b57c
Query the timefactory instead of creating it
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-31 17:17:46 +01:00
Lukas Reschke 0e2aee2be6
Replace with exception instead of boolean return value
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-31 17:17:46 +01:00
Lukas Reschke 32cf661215
Use new appstore API
This change introduces the new appstore API in Nextcloud.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-31 17:17:44 +01:00
Roeland Jago Douma 94d09141f8
Remove legacy l10n
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-28 22:16:33 +02:00
Roeland Jago Douma 83e7cfd13a
Fix more tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-28 22:16:28 +02:00
Roeland Jago Douma 740659a04c
Move away from OC_L10N
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-28 21:46:28 +02:00
Roeland Jago Douma b05fe45d52
Fix avatar on exif rotated images
Fixes #1928

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-26 21:37:11 +02:00
Lukas Reschke fdcb8edd78
Add nonce also to legacy CSP
Pages that do not use the AppFramework have its CSP inherited from `\OC_Response::addSecurityHeaders`. While those are not many anymore, there are some examples such as the "Help" page.

To stay completely backwards-compatible we should also add the nonce to the legacy CSP response.

To test that open your browser console and open the help page. Without this you will get a JS error. With this you won't.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-26 09:41:18 +02:00
Joas Schilling 890f752a6b Merge pull request #1452 from nextcloud/appconfig-endpoint
Appconfig endpoint
2016-10-25 10:57:48 +02:00
Morris Jobke 8a231a4223 Merge pull request #1829 from nextcloud/downstream-26256
Fix login page handling for disabled users
2016-10-24 21:35:53 +02:00
Morris Jobke 567e28b01a Merge pull request #1885 from nextcloud/downstream-26295
App dependencies are now analysed on app enable as well - not only on…
2016-10-24 21:26:50 +02:00
RealRancor 14b1d946a8
Remove checks whether OC is running on Windows pt. 2 2016-10-24 16:12:17 +02:00
Thomas Müller 03ec052b4e
App dependencies are now analysed on app enable as well - not only on app install. 2016-10-24 15:59:46 +02:00
Lukas Reschke 1be6213ba4 Merge pull request #1832 from nextcloud/select2-into-core
Select2 into core
2016-10-22 14:35:07 +02:00
John Molakvoæ 3e5e07aa64
Template css order
Select2 systemtags removal
Settings again
Fix Script

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2016-10-21 16:56:31 +02:00
Joas Schilling 0b1fb180a5
Make AppConfig part of the public API
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-21 09:09:23 +02:00
Joas Schilling 246bb9f33d
Move OC\Files\Storage\Shared to the right namespace 2016-10-20 20:27:44 +02:00
Sergio Bertolín 0417cbafd0
Changed request to not add a prefix to the url (#26256)
* Changed request to not add a prefix to the url

* Expecting forbidden instead of service unavailable

* Handling login exceptions
2016-10-20 17:21:08 +02:00
Morris Jobke f7ca3ec201
Remove unneeded compatibility polyfills
- `Object.create` supported with IE9+: https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Browser_compatibility
- `Object.keys` supported with IE9+: https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Object/keys#Browser_compatibility
- `Array.prototype.filter` supported in IE9+: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter#Browser_compatibility
- `Array.prototype.indexOf` supported in IE9+: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf#Browser_compatibility
- `Array.prototype.map` supported in IE9+: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map#Browser_compatibility
- `Function.prototype.bind` supported in IE9+: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Browser_compatibility
- `String.prototype.trim` supported with IE9+: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Browser_compatibility
- `outerHTML` supported with Firefox 11+: https://developer.mozilla.org/en-US/docs/Web/API/Element/outerHTML#Browser_compatibility
- `window.devicePixelRatio` supported in IE11+: http://caniuse.com/#feat=devicepixelratio

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-10-20 10:17:18 +02:00
Morris Jobke a8cf110ec6
Remove unneeded placeholder polyfill
* placeholders are supported in IE11+
* http://caniuse.com/#feat=input-placeholder

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-10-20 00:00:25 +02:00
Morris Jobke 195fc041da Merge pull request #1663 from nextcloud/dont-reparse-info-xml
Dont reparse info xml + cache AppInfo XML
2016-10-10 09:22:43 +02:00
Lukas Reschke 0245dd7221
Simplify isSubDirectory check
Shaves off another 9ms per request as can be seen at https://blackfire.io/profiles/compare/dd54cef3-e58d-4a22-b8f4-c7c4b70697be/graph

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-07 21:56:43 +02:00
Lukas Reschke 0c2b17c80f
Cache AppInfo in Memory Cache if configured
This saves around 20ms on a bare-bone instance, on bigger ones more (depending on the number of installed apps).

See https://blackfire.io/profiles/compare/fc326ad3-100d-49b8-8ea9-8343240f53f3/graph

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-10-07 21:29:23 +02:00
Thomas Müller 67d3574bdf
Don't parse info.xml but reuse already cached app infos - fixes #25603 (#25968)
* Don't parse info.xml but reuse already cached app infos - fixes #25603

* Use === in InfoParser. Fixes test

* InfoParser should not depend on UrlGenerator - fixes issue with session being closed too early
2016-10-07 20:58:22 +02:00
Lukas Reschke ea9b1cc340 Merge pull request #1306 from nextcloud/simplefs
Introducing AppData
2016-10-06 09:25:15 +02:00
Roeland Jago Douma f23390ed02
Kill users with the reserved name on login
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-05 11:00:16 +02:00
Joas Schilling 53ed3da052
Fallback from "de" to "de_DE" and the other way around
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-04 13:29:54 +02:00
Joas Schilling 3a5022ad5b
Allow multiple names and description
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-09-30 11:00:58 +02:00
Vincent Petry da0cea404d
Kill update simulation
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-27 18:43:53 +02:00
Morris Jobke 6a3e0f33b3 Merge pull request #1489 from nextcloud/fix-status-code-when-app-is-disabled
Return 404 on v2.php when the app is disabled
2016-09-27 11:04:57 +02:00
Lukas Reschke 19ad11cce4
Graceful error handling and logging
Right now a failed "copyr" will result in the error log being spammed with not really helpful error messages. Also situations such as `$dir` returning `false` are not really caught.

This adds more error handling and logging to make debugging such situations easier.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-09-25 19:03:42 +02:00
Joas Schilling 78210c8300
Return 404 on v2.php when the app is disabled
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-09-22 12:18:40 +02:00
Joas Schilling 7c0951244a
Deprecate getEditionString() 2016-09-06 16:05:28 +02:00
Joas Schilling b072c6c943
Move navigation entries without order to the end 2016-09-02 09:11:58 +02:00
Thomas Müller df1cc94c23
Some cleanup within OC_Image (#25875) 2016-08-29 14:31:59 +02:00
Lukas Reschke 25f1fdb275 Merge pull request #847 from nextcloud/quota-mount-in-homefolder
fix quota calculation when a filesystem is mounted in a user home
2016-08-28 15:05:46 +02:00
Raghu Nayyar 9dc23592c3 Merge pull request #1105 from nextcloud/usermenu-ordering
fix ordering of user menu entries
2016-08-28 10:30:16 +02:00
Lukas Reschke 4d85ffc27c Merge pull request #1054 from nextcloud/less-cache-hits
Reduce the number of cache operations for dav operations
2016-08-27 22:44:29 +02:00
Jan-Christoph Borchardt 0517f41b3f fix ordering of user menu entries 2016-08-27 22:42:08 +02:00
Robin Appelman 2693ae870e cache user folders 2016-08-25 17:22:25 +02:00
Christoph Wurst 6af2efb679
prevent infinite redirect loops if the there is no 2fa provider to pass
This fixes infinite loops that are caused whenever a user is about to solve a 2FA
challenge, but the provider app is disabled at the same time. Since the session
value usually indicates that the challenge needs to be solved before we grant access
we have to remove that value instead in this special case.
2016-08-24 10:49:23 +02:00
Lukas Reschke 0747e96b9c
Cache registered autoloaders
This saves more than 20ms (!) on every request, the previous problem was that `\OC_App::registerAutoloading` calls `\OC\AppFramework\App::buildAppNamespace` which parses the appinfo.xml. Since that was also called multiple times (e.g. on cloud.nextcloud.com over 200 times) that had a significant performance impact. Also on simple PROPFIND requests.

https://blackfire.io/profiles/compare/65a53e6e-7f35-4974-b559-4c81abd01c3b/graph shows the difference nicely.
2016-08-22 23:49:46 +02:00
Roeland Jago Douma 3a17fabd04
Remove unused private classes 2016-08-18 09:37:11 +02:00
Lukas Reschke 5aaa065d6d Merge pull request #848 from nextcloud/public-link-quota
fix getting quota for public links with quota_include_external_storage
2016-08-17 20:13:56 +02:00
Robin Appelman 5a599d5c4e Merge pull request #899 from nextcloud/nfd-default
[us] Disable NFD encoding wrapper by default
2016-08-17 14:46:52 +02:00
Vincent Petry 9f523518f3 Disable NFD encoding wrapper by default
Seems I forgot to set it back to false after testing.
Will give a performance boost for all storages.
2016-08-17 11:54:33 +02:00
Arthur Schiwon 717e22267a
Merge branch 'master' into implement_712 2016-08-16 18:31:59 +02:00
Arthur Schiwon 208e551216
check registered sections and settings after an app got updated to garbage collect orphaned classes 2016-08-16 00:56:17 +02:00
Jörn Friedrich Dreyer 264aaf9ffa
use $userId instead of $user 2016-08-14 19:50:19 +02:00
Thomas Müller 26342061b9
Ensure the user exists before calling a method on it - fixes #24751 2016-08-14 19:50:03 +02:00
Robin Appelman 85d3fb76d7 fix getting quota for public links with quota_include_external_storage 2016-08-12 15:59:19 +02:00
Robin Appelman ef2116a17a fix quota calculation when a filesystem is mounted in a user home 2016-08-12 15:41:37 +02:00
Arthur Schiwon ac04ba6784
register app autoload instead of loading apps 2016-08-12 13:23:14 +02:00
Lukas Reschke 8261ccce1b
Merge branch 'master' into implement_712 2016-08-11 19:37:17 +02:00
Arthur Schiwon f3b15a9ab9
fixes, improvements, and another app:
* setupSettings now also triggered on enable
* fixes detection of present admin section or settings in the DB
* add update routine in such cases
* encryption app migrated
2016-08-11 01:41:18 +02:00