Commit graph

10758 commits

Author SHA1 Message Date
Arthur Schiwon
dec1f1d24a anounce CommentsManager getter in public server interface 2015-12-09 14:34:23 +01:00
Arthur Schiwon
0c1c029571 hardening, add some checks for whitespace-only strings 2015-12-09 14:34:23 +01:00
Arthur Schiwon
f9081303b1 fix phpdoc 2015-12-09 14:34:23 +01:00
Arthur Schiwon
b44a33f68f fix php doc 2015-12-09 14:34:23 +01:00
Arthur Schiwon
9a440c06b0 OC not oc 2015-12-09 14:34:23 +01:00
Arthur Schiwon
9dc4171830 parameter checks for setting actor and object to happen only in one place 2015-12-09 14:34:23 +01:00
Arthur Schiwon
4273689e9f fix usage of empty 2015-12-09 14:34:23 +01:00
Arthur Schiwon
e3dbc3d40c different strategy in cleaning up after user was deleted
we do not listen to deletion hooks anymore, because there is no guarantee that they
will be heard - requires that something fetches the CommentsManager first.

Instead, in the user deletion routine the clean up method will be called directly. Same way
as it happens for files, group memberships, config values.
2015-12-09 14:34:23 +01:00
Arthur Schiwon
2ce2de0ae5 add icommentsmanger and icomment implementation
register CommentsManager service, allow override, document in config.sample.php

don't insert autoincrement ids in tests, because of dislikes from oracle and pgsql

specify timezone in null date

only accepts strings for ID parameter that can be converted to int

replace forgotten hardcoded IDs in tests

react on deleted users

react on file deletion

Postgresql compatibility

lastInsertId needs *PREFIX* with the table name

do not listen for file deletion, because it is not reliable (trashbin, external storages)

add runtime cache for comments
2015-12-09 14:34:23 +01:00
Thomas Müller
04f4565fcd Merge pull request #21060 from owncloud/support-for-read-only-config-dir
Add support for read only config dir
2015-12-09 14:32:00 +01:00
Thomas Müller
5c95939bf3 Merge pull request #21061 from owncloud/fix-oracle-last-insert-id-test
Fix the last insert id test by changing to an autoincremen…
2015-12-09 11:53:43 +01:00
Thomas Müller
eb14c9dc1e Merge pull request #21056 from owncloud/check-return
Verify return type
2015-12-09 11:29:25 +01:00
Thomas Müller
74e7fb1438 Merge pull request #21055 from owncloud/fix-php-docs-for-console
Fix PHPDoc and check if path does exists
2015-12-09 11:28:53 +01:00
Joas Schilling
bef6344b27 Do not quote the table name for lastInsertId() 2015-12-09 11:09:02 +01:00
Thomas Müller
bb8dbc291b Merge pull request #21005 from owncloud/verify_password_before_unshare
The ajax code path unshares a link share when updating the password
2015-12-09 10:05:20 +01:00
Thomas Müller
bc744ff6de Merge pull request #21038 from owncloud/share-computesharepermissions-notstore
Fix (re)share permission checks in a few code paths
2015-12-09 10:04:56 +01:00
Thomas Müller
6ba22f0243 Merge pull request #21043 from owncloud/add-php-doc
Add type description
2015-12-09 10:04:30 +01:00
Lukas Reschke
b50987165e Add support for read only config dir
We already support the `config_is_read_only` for the config file itself. However not for the whole directory (which is a bug).

This unifies the check in the checkServer routine with the one in base.php. Now one can enable a read only config folder so that ownCloud is not allowed to overwrite it's own source code.

To test this set the whole config folder to read only, clear your session, refresh, see it fails, add the new code, refresh, see it works. Also verify that setup still works fine. (obviously setup does not work with a read only config Also verify that setup still works fine. (obviously setup does not work with a read only config))

Fixes https://github.com/owncloud/core/issues/14455
2015-12-09 08:54:11 +01:00
Jenkins for ownCloud
dda9525c4b [tx-robot] updated from transifex 2015-12-09 01:55:14 -05:00
Lukas Reschke
61da3d530d Verify return type
Can also be null. Silences another security warning...
2015-12-09 07:32:19 +01:00
Lukas Reschke
11e98e2de6 Fix PHPDoc and check if path does exists
Mutes another security warning of some static scanners.
2015-12-09 06:57:24 +01:00
Vincent Petry
d0cca6c3ad Add explicit check for groups excluded from sharing
Since isSharable() doesn't do the check for groups excluded from
sharing, adding an explicit check in the sharing code.
2015-12-08 16:48:33 +01:00
Lukas Reschke
7c45eaa70b Add type description
Allows IDEs and static code analyzers. Would have saved me some minutes today :)
2015-12-08 15:20:54 +01:00
Thomas Müller
49095fa4bb Merge pull request #21031 from owncloud/sanitize-findAppInDirectories
Sanitize the appId passed to `findAppInDirectories`
2015-12-08 13:52:04 +01:00
Thomas Müller
45fe8271ab Merge pull request #21030 from owncloud/querybuilder-new-features
Querybuilder new features
2015-12-08 13:51:45 +01:00
Thomas Müller
85409b6701 Merge pull request #20786 from owncloud/systemtags-dav
DAV endpoint for system tags
2015-12-08 13:51:25 +01:00
Vincent Petry
6e4006d139 Add reshare permission checks
Added in isSharable() in incoming remote share.
Added in isSharable() in regular incoming share.
Added in FileInfo to make sure the proper attributes are returned to the
clients.
2015-12-08 13:13:26 +01:00
Vincent Petry
e241d26316 Compute share permissions in the view
The share permissions are now computed in the View/FileInfo instead of
storing them directly/permanently on the storage
2015-12-08 13:04:22 +01:00
Joas Schilling
9f98849306 Add a method to the get "to use" table and column name 2015-12-08 11:04:28 +01:00
Thomas Müller
fe8dc0bd5e Merge pull request #21022 from owncloud/get-rid-of-by-reference
Get rid of by reference
2015-12-08 11:04:25 +01:00
Lukas Reschke
715f89a9d9 Sanitize the appId passed to findAppInDirectories
Would have prevented quite some security bugs in the past. Nice hardening for now.
2015-12-08 10:03:22 +01:00
Joas Schilling
a3391248e4 Add select distinct to the query builder 2015-12-08 09:49:21 +01:00
Joas Schilling
f2c7acb3c0 Allow getting the last insert id without much hassle 2015-12-08 09:40:20 +01:00
Lukas Reschke
4b293dffe5 Use \OCP\Util::sanitizeHTML instead of \OC_Util::sanitizeHTML 2015-12-08 08:56:47 +01:00
Lukas Reschke
70c228a7cc Get rid of passing a reference
Fixes https://github.com/owncloud/core/issues/14643
2015-12-08 08:56:46 +01:00
Lukas Reschke
8289943a0f Do not trust casting 2015-12-08 08:50:00 +01:00
Lukas Reschke
451ba4ddaa Remove unused repair steps
These ones are not necessary anymore for the new major release.
2015-12-08 08:46:41 +01:00
Lukas Reschke
6ea7410041 Remove legacy check
This one is not required anymore as we have the RepairConfig repair step since November 2014.
2015-12-08 08:44:42 +01:00
Lukas Reschke
8903afec26 Don't write directives from CLI 2015-12-08 08:17:04 +01:00
Lukas Reschke
0a89073c47 Run .htaccess updates in any case
This is the same what we also do in updater.php and thus this aligns the code. Makes the code paths more consistent.
2015-12-08 08:16:24 +01:00
Lukas Reschke
235094ab54 Remove version check out of .htaccess
This can now be achieved using the new code signing.
2015-12-08 08:16:23 +01:00
Lukas Reschke
3bce1b20fe Add DirectorySlash to dynamic .htaccess write
When `DirectorySlash off` is set then Apache will not lookup folders anymore. This is required for example when we use the rewrite directives on an existing path such as  `/core/search`. By default Apache would load `/core/search/` instead `/core/search` so the redirect would fail here.

This leads however to the problem that URLs such as `localhost/owncloud` would not load anymore while `localhost/owncloud/` would. This has caused problems such as https://github.com/owncloud/core/pull/21015

With this change we add the `DirectorySlash off` directive only when the `.htaccess` is writable to the dynamic part of it. This would also make `localhost/owncloud` work again as it would trigger the 404 directive which triggers the redirect in base.php.
2015-12-08 08:10:55 +01:00
Jenkins for ownCloud
736e133c04 [tx-robot] updated from transifex 2015-12-08 01:56:19 -05:00
Thomas Müller
4100263bd6 Merge pull request #20996 from owncloud/issue-12215-remove-password-reset-when-not-possible
Issue 12215 remove password reset when not possible
2015-12-07 19:55:26 +01:00
Scrutinizer Auto-Fixer
453e1bf66e Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-12-07 15:43:36 +00:00
Roeland Jago Douma
780d80d7c3 The ajax code path unshares a link share when updating the password
In order to not mess up existing shares if the password gets verified we
should first fire this validation.
2015-12-07 16:38:49 +01:00
Thomas Müller
663f31b127 Merge pull request #20993 from owncloud/issue-20666-language-always-overwritten
Do not overwrite the language when it's just missing for one app
2015-12-07 16:19:21 +01:00
Joas Schilling
87bc02c6cd Allow specifying a custom reset-password-url 2015-12-07 15:41:40 +01:00
Thomas Müller
a9e5faf7d0 Merge pull request #20981 from owncloud/issue-19848-multiple-emails-for-sharelink
Allow sending a share email to multiple users
2015-12-07 15:17:19 +01:00
Joas Schilling
f8f3c9ecf9 Remove password reset when the user can not change the password 2015-12-07 15:14:19 +01:00
Joas Schilling
c6dbe8ac63 Do not overwrite the language when it's just missing for one app 2015-12-07 14:46:53 +01:00
Thomas Müller
d155c8e5fe Add unix_socket support for mysql during initial installation - fixes #20210 2015-12-07 12:00:31 +01:00
Joas Schilling
5b87413792 Allow sending a share email to multiple users 2015-12-07 10:49:34 +01:00
Thomas Müller
764b2932ff Merge pull request #20960 from owncloud/drop-OC_Util-getUrlContent
Remove OC_Util::getUrlContent and replace by proper usage of public i…
2015-12-07 10:21:16 +01:00
Thomas Müller
f3d49a89fe Merge pull request #11131 from owncloud/use-phpini-wrapper
Replacing ini_get instances with inigetwrapper usages
2015-12-07 10:20:59 +01:00
Thomas Müller
0c3d97921f Merge pull request #20904 from owncloud/view-mime-filter
Fix mimetype filter in getDirectoryContent
2015-12-07 10:20:43 +01:00
Thomas Müller
e1f2965e54 Merge pull request #20949 from owncloud/fix_20892
[Sharing] Properly check if a group already has access
2015-12-07 10:20:05 +01:00
Thomas Müller
c1fb9fa483 Merge pull request #20957 from owncloud/use-correct-method-signature
Use correct method signature
2015-12-07 10:18:03 +01:00
Thomas Müller
c9069d5711 Merge pull request #20959 from owncloud/drop-OC_App-setActiveNavigationEntry
Remove unused setActiveNavigationEntry of OC_App - it's also in OCP\App
2015-12-07 10:17:44 +01:00
Jenkins for ownCloud
884946276e [tx-robot] updated from transifex 2015-12-07 01:54:35 -05:00
Jenkins for ownCloud
d14f128329 [tx-robot] updated from transifex 2015-12-06 01:54:33 -05:00
Jenkins for ownCloud
f0b1ba713d [tx-robot] updated from transifex 2015-12-05 01:55:14 -05:00
Morris Jobke
4548a0aa90 Remove OC_Util::getUrlContent and replace by proper usage of public interfaces 2015-12-04 18:02:47 +01:00
Vincent Petry
316b907a13 Fixed system tags DAV and API and docs 2015-12-04 17:30:50 +01:00
Morris Jobke
46a6c6d70b remove OC_App::getActiveNavigationEntry - not unsed anymore 2015-12-04 17:26:28 +01:00
Morris Jobke
e6d4496fc2 Remove unused setActiveNavigationEntry of OC_App - it's also in OCP\App 2015-12-04 17:23:51 +01:00
Lukas Reschke
d522797227 Use correct method signature
This function takes only one parameter
2015-12-04 15:52:42 +01:00
Roeland Jago Douma
11d8b336e2 [Sharing] Properly check if a group already has access
The old code check was to liberal resulting in wrong matches if a user
with the same name as the group already had access.

Fixes 20892
2015-12-04 12:22:21 +01:00
Thomas Müller
6034c9142d Merge pull request #20933 from owncloud/more-OC_Config-cleanups
More cleanups of OC_Config usage
2015-12-04 09:06:47 +01:00
Jenkins for ownCloud
a2848af625 [tx-robot] updated from transifex 2015-12-04 01:56:31 -05:00
Thomas Müller
602b636d3e Merge pull request #20807 from owncloud/dont-append-redirect-url-if-user-is-already-logged-in
Don't append redirect URL if user is logged-in
2015-12-03 16:53:59 +01:00
Thomas Müller
2ceae43989 Merge pull request #20545 from owncloud/scan-storage-in-background-job
Move files/ajax/scan.php to background job
2015-12-03 16:53:46 +01:00
Morris Jobke
c60c793cf2 More cleanups of OC_Config usage 2015-12-03 16:41:23 +01:00
Thomas Müller
1fe7957fd0 Merge pull request #20924 from owncloud/use-url-generator-to-generate-link
Use URLGenerator instead of hard-coded WEBROOT
2015-12-03 15:26:14 +01:00
Vincent Petry
cc72c6a30d Added dav endpoints for system tags 2015-12-03 15:23:21 +01:00
Lukas Reschke
1f69dcb593 Use URLGenerator instead of hard-coded WEBROOT
Fixes https://github.com/owncloud/core/issues/20922
2015-12-03 14:42:14 +01:00
Morris Jobke
aa0265bd34 Replace OC_Config in setup 2015-12-03 14:35:15 +01:00
Thomas Müller
2d1cc8aaeb Merge pull request #19461 from owncloud/reuse_code
reuse code
2015-12-03 13:55:50 +01:00
Robin Appelman
19b2fe6a3a Fix mimetype filter in getDirectoryContent 2015-12-03 13:09:13 +01:00
Jesús Macias
9dd11091d4 Fix code from comments 2015-12-03 10:00:11 +01:00
Jesús Macias
98f5c50aa4 Migrate storate status code to storagenotavailablexception 2015-12-03 09:59:45 +01:00
Jesús Macias
4ead2bc861 Fix code from PR comments 2015-12-03 09:58:55 +01:00
Jesús Macias
7cd13f462a Add new external storage exceptions for different errors 2015-12-03 09:57:59 +01:00
Thomas Müller
e7239b6553 Merge pull request #20872 from owncloud/systemtags-better-not-found-exception
Systemtags better not found exception
2015-12-03 09:26:05 +01:00
Thomas Müller
a5c80ba8bc Merge pull request #20894 from owncloud/post-delete-meta-view
Also add metadata for postDelete hooks triggered from the view
2015-12-03 09:24:54 +01:00
Thomas Müller
7fefd4f4d9 Merge pull request #20860 from owncloud/use-user-getEMailAddress-all-over-the-place
User IUser::getEMailAddress() all over the place
2015-12-03 09:21:53 +01:00
Thomas Müller
09600058d0 Merge pull request #20901 from owncloud/get-rid-of-more-legacy-config-stuff
Replace old config code with usage of proper APIs
2015-12-02 21:54:42 +01:00
Thomas Müller
dcc7ff09ba Adding unit test for MailNotifications::sendInternalShareMail() 2015-12-02 21:42:14 +01:00
Thomas Müller
eebe2b9c23 User IUser::getEMailAddress() all over the place 2015-12-02 21:25:05 +01:00
Thomas Müller
df5872ec50 Merge pull request #20719 from owncloud/adding-system-addressbook-of-users
Adding system addressbook for users of this instance - a occ command …
2015-12-02 16:17:58 +01:00
Morris Jobke
37ecde065b Replace old config code with usage of proper APIs 2015-12-02 15:56:59 +01:00
Morris Jobke
baecfc4080 Reduce OC_Config usage in lib/
* replaced by proper public interfaces
2015-12-02 14:49:40 +01:00
Thomas Müller
28ceab2f61 Fix endless recursion 2015-12-02 14:44:41 +01:00
Robin Appelman
0062888aaf Also add metadata for postDelete hooks triggered from the view 2015-12-02 13:51:26 +01:00
Thomas Müller
8d218bf3ef Merge pull request #20875 from owncloud/remove-changepropagator
remove old propagation logic
2015-12-02 13:03:31 +01:00
Lukas Reschke
4d9af08f12 Execute only for web and not for CLI 2015-12-02 11:49:33 +01:00
Lukas Reschke
09d9e430d8 Add a trailing slash to generated URLs 2015-12-02 11:27:07 +01:00
Lukas Reschke
125b7e7512 Ensure that ownCloud is always accessed with a trailing slash 2015-12-02 11:26:41 +01:00
Thomas Müller
812a390f32 Merge pull request #20879 from owncloud/check-if-rewrite-base-is-set-if-rewrite-is-active
Check if rewrite base is set if rewrite is active
2015-12-02 10:56:44 +01:00
Thomas Müller
c46ea30248 Merge pull request #20865 from owncloud/post-delete-meta
Add metadata to post delete hooks
2015-12-02 10:12:54 +01:00
Thomas Müller
f840d8dee7 Merge pull request #20874 from owncloud/allow-di-mimetypedetector
Allow DI for OCP\Files\IMimeTypeDetector
2015-12-02 10:12:35 +01:00
Thomas Müller
0bd0212731 Merge pull request #20877 from owncloud/fix-empty-expirationDate
Check the expiration date for null
2015-12-02 10:12:16 +01:00
Thomas Müller
4c695e63c0 Fix comments 2015-12-02 09:20:58 +01:00
Thomas Müller
0391cc0451 Fix getCloudId 2015-12-02 09:14:41 +01:00
Thomas Müller
6abc02cb88 Proposal: add enumeration function to IUserManager which simply calls a callbask for each user in all backends 2015-12-02 09:14:41 +01:00
Thomas Müller
df6fc6cc70 Add the user's cloud id to the vCard 2015-12-02 09:14:41 +01:00
Thomas Müller
dad6470baa Add IUser::getAvatarImage() for easy access 2015-12-02 09:14:41 +01:00
Jenkins for ownCloud
4f4b91a9ec [tx-robot] updated from transifex 2015-12-02 02:00:28 -05:00
Roeland Jago Douma
b00db2c933 DI in avatar code
* DI in avatar code
* Use the node API
* More unit tests
* Unit tests no longer require DB
2015-12-01 22:15:43 +01:00
Lukas Reschke
6a067b1ec9 Set RewriteBase to / if OC::WEBROOT is not set 2015-12-01 22:03:25 +01:00
Lukas Reschke
002e719789 Set "SetEnv" within base .htaccess file
mod_rewrite as used by the front controller may require a `RewriteBase` in case the installation is done using an alias. Since we cannot enforce a writable `.htaccess` file this will move the `front_controller_active` environment variable into the main .htaccess file. If administrators decide to have this one not writable they can still enable this feature by setting the `front_controller_active` environment variable within the Apache config.
2015-12-01 19:06:48 +01:00
Morris Jobke
3061e5d2fc Check the expiration date for null
* null is always less than any value -> expirationDate gets null
  which is "no date set"
* ref https://github.com/owncloud/core/issues/20590#issuecomment-158393075
2015-12-01 17:43:05 +01:00
Robin Appelman
62cc316c6a remove old propagation logic 2015-12-01 16:50:20 +01:00
Joas Schilling
44852ce324 Allow DI for OCP\Files\IMimeTypeDetector 2015-12-01 16:49:20 +01:00
Lukas Reschke
2515cb17be Support pretty URLs
This changeset allows ownCloud to run with pretty URLs, they will be used if mod_rewrite and mod_env are available. This means basically that the `index.php` in the URL is not shown to the user anymore.

Also the not deprecated functions to generate URLs have been modified to support this behaviour, old functions such as `filePath` will still behave as before for compatibility reasons.

Examples:
http://localhost/owncloud/index.php/s/AIDyKbxiRZWAAjP => http://localhost/owncloud/s/AIDyKbxiRZWAAjP
http://localhost/owncloud/index.php/apps/files/ => http://localhost/owncloud/apps/files/

Due to the way our CSS and JS is structured the .htaccess uses some hacks for the final result but could be worse... And I was just annoyed by all that users crying for the removal of `index.php` ;-)
2015-12-01 16:46:07 +01:00
Thomas Müller
74e8c25a5b Merge pull request #20285 from owncloud/add-integrity-checker
Add code integrity checker foundation
2015-12-01 15:27:50 +01:00
Joas Schilling
1d0c041ac8 Add a method to get the list of tags from the TagNotFound Exception 2015-12-01 14:54:34 +01:00
Robin Appelman
0d63e95a5d Add metadata to post delete hooks 2015-12-01 13:22:58 +01:00
Joas Schilling
1761fdd9ee Fix the docs of the exceptions and remove hardcoded language from the message 2015-12-01 12:32:50 +01:00
Lukas Reschke
4971015544 Add code integrity check
This PR implements the base foundation of the code signing and integrity check. In this PR implemented is the signing and verification logic, as well as commands to sign single apps or the core repository.

Furthermore, there is a basic implementation to display problems with the code integrity on the update screen.

Code signing basically happens the following way:

- There is a ownCloud Root Certificate authority stored `resources/codesigning/root.crt` (in this PR I also ship the private key which we obviously need to change before a release 😉). This certificate is not intended to be used for signing directly and only is used to sign new certificates.
- Using the `integrity:sign-core` and `integrity:sign-app` commands developers can sign either the core release or a single app. The core release needs to be signed with a certificate that has a CN of `core`,  apps need to be signed with a certificate that either has a CN of `core` (shipped apps!)  or the AppID.
- The command generates a signature.json file of the following format:
```json
{
    "hashes": {
        "/filename.php": "2401fed2eea6f2c1027c482a633e8e25cd46701f811e2d2c10dc213fd95fa60e350bccbbebdccc73a042b1a2799f673fbabadc783284cc288e4f1a1eacb74e3d",
        "/lib/base.php": "55548cc16b457cd74241990cc9d3b72b6335f2e5f45eee95171da024087d114fcbc2effc3d5818a6d5d55f2ae960ab39fd0414d0c542b72a3b9e08eb21206dd9"
    },
    "certificate": "-----BEGIN CERTIFICATE-----MIIBvTCCASagAwIBAgIUPvawyqJwCwYazcv7iz16TWxfeUMwDQYJKoZIhvcNAQEF\nBQAwIzEhMB8GA1UECgwYb3duQ2xvdWQgQ29kZSBTaWduaW5nIENBMB4XDTE1MTAx\nNDEzMTcxMFoXDTE2MTAxNDEzMTcxMFowEzERMA8GA1UEAwwIY29udGFjdHMwgZ8w\nDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANoQesGdCW0L2L+a2xITYipixkScrIpB\nkX5Snu3fs45MscDb61xByjBSlFgR4QI6McoCipPw4SUr28EaExVvgPSvqUjYLGps\nfiv0Cvgquzbx/X3mUcdk9LcFo1uWGtrTfkuXSKX41PnJGTr6RQWGIBd1V52q1qbC\nJKkfzyeMeuQfAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAvF/KIhRMQ3tYTmgHWsiM\nwDMgIDb7iaHF0fS+/Nvo4PzoTO/trev6tMyjLbJ7hgdCpz/1sNzE11Cibf6V6dsz\njCE9invP368Xv0bTRObRqeSNsGogGl5ceAvR0c9BG+NRIKHcly3At3gLkS2791bC\niG+UxI/MNcWV0uJg9S63LF8=\n-----END CERTIFICATE-----",
    "signature": "U29tZVNpZ25lZERhdGFFeGFtcGxl"
}
```
`hashes` is an array of all files in the folder with their corresponding SHA512 hashes (this is actually quite cheap to calculate), the `certificate` is the  certificate used for signing. It has to be issued by the ownCloud Root Authority and it's CN needs to be permitted to perform the required action. The `signature` is then a signature of the `hashes` which can be verified using the `certificate`.

Steps to do in other PRs, this is already a quite huge one:
- Add nag screen in case the code check fails to ensure that administrators are aware of this.
- Add code verification also to OCC upgrade and unify display code more.
- Add enforced code verification to apps shipped from the appstore with a level of "official"
- Add enfocrced code verification to apps shipped from the appstore that were already signed in a previous release
- Add some developer documentation on how devs can request their own certificate
- Check when installing ownCloud
- Add support for CRLs to allow revoking certificates

**Note:** The upgrade checks are only run when the instance has a defined release channel of `stable` (defined in `version.php`). If you want to test this, you need to change the channel thus and then generate the core signature:

```
➜  master git:(add-integrity-checker) ✗ ./occ integrity:sign-core --privateKey=resources/codesigning/core.key --certificate=resources/codesigning/core.crt
Successfully signed "core"
```

Then increase the version and you should see something like the following:

![2015-11-04_12-02-57](https://cloud.githubusercontent.com/assets/878997/10936336/6adb1d14-82ec-11e5-8f06-9a74801c9abf.png)

As you can see a failed code check will not prevent the further update. It will instead just be a notice to the admin. In a next step we will add some nag screen.

For packaging stable releases this requires the following additional steps as a last action before zipping:
1. Run `./occ integrity:sign-core` once
2. Run `./occ integrity:sign-app` _for each_ app. However, this can be simply automated using a simple foreach on the apps folder.
2015-12-01 11:55:20 +01:00
Joas Schilling
3c5a6b829e Allow DI the system tag stuff without Application class 2015-11-30 17:08:29 +01:00
Thomas Müller
08248f66ba Merge pull request #20650 from owncloud/systemtags-core
Implement systemtag managers and mapper
2015-11-30 15:38:43 +01:00
Thomas Müller
995ceeb8d9 Merge pull request #20815 from owncloud/avatar-cache-size
cache resized avatars
2015-11-30 14:27:05 +01:00
Thomas Müller
fc21aa6c41 Merge pull request #20248 from owncloud/use-phpunit-groups-to-run-database-code-in-isolation
Use phpunit groups to run database code in isolation
2015-11-30 14:25:35 +01:00
Lukas Reschke
f4eb15d340 Show error template
Otherwise this leads to an endless redirection in case of a CSRF exception. Also sets user expectation right.
2015-11-30 11:25:52 +01:00
Thomas Müller
a94819f4a4 Merge pull request #20809 from owncloud/dont-trust-update-server-message
Don't trust update server
2015-11-30 11:20:30 +01:00
Thomas Müller
f9fc254672 Add DB group to some files_external tests
Adding group Db to federation tests and ldap tests

Add group DB to Test_UrlGenerator

Adding group DB to trashbin and versions tests

Adding group DB to Test_Util_CheckServer for pg
2015-11-30 10:55:10 +01:00
Joas Schilling
c4bebf66d4 Do not count the entries when we only need to know if it is at least one 2015-11-30 10:20:00 +01:00
Joas Schilling
aa1a0a15ea Fix use statements 2015-11-30 10:12:15 +01:00
Thomas Müller
9c1dbaf0ad Merge pull request #20788 from owncloud/catch-missing-route
Dont die when we're missing a route
2015-11-30 10:11:12 +01:00
Joas Schilling
6816b36cdb Add backticks inside function to escape the column 2015-11-30 10:07:00 +01:00
Vincent Petry
17ce120736 Revert "Dont bother with stream_resolve_include_path if the path is already absolute" 2015-11-29 10:54:29 +01:00
Robin Appelman
6b7e748245 cache resized avatars 2015-11-28 17:33:16 +01:00
Lukas Reschke
391bc49dab Move files/ajax/scan.php to background job
The background job will now be executed in chunks of 500 users all 10 minutes.
2015-11-28 13:06:53 +01:00
Lukas Reschke
f3e9106864 Don't trust update server
In case the update server may deliver malicious content this would allow an adversary to inject arbitrary HTML into the response. So very bad stuff.

While signing the response would be better and something we can also do in the future (considering the code signing work), this is already a good first start.
2015-11-28 12:21:53 +01:00
Robin Appelman
4c4331982c Merge pull request #20789 from owncloud/scanner-skip-not-available
Skip unavailable storages in scanner
2015-11-27 22:57:47 +01:00
Vincent Petry
b666367a79 Added system tags data structure and PHP side managers
Added SystemTagManager and SystemTagObjectMapper
2015-11-27 17:54:29 +01:00
Thomas Müller
2b316eaa83 Merge pull request #20792 from owncloud/autoloader-absolute-paths
Dont bother with stream_resolve_include_path if the path is already absolute
2015-11-27 16:03:39 +01:00
Robin Appelman
b05c8faba8 Dont die when we're missing a route 2015-11-27 14:29:06 +01:00
Robin Appelman
816cd66b4b also log exception 2015-11-27 14:28:15 +01:00
Thomas Müller
bdbefe17d6 Merge pull request #20782 from mitar/better-https
Also allow empty value for no-HTTPS
2015-11-27 14:24:23 +01:00
Robin Appelman
50474c6041 Dont bother with stream_resolve_include_path if the path is already absolute 2015-11-27 14:12:14 +01:00
Robin Appelman
ae71f80f4a Skip unavailable storages in scanner 2015-11-27 14:02:50 +01:00
Mitar
59511d97ee Also allow empty value for no-HTTPS.
This makes it work better with old version of Nginx.
2015-11-27 01:01:56 -08:00
Morris Jobke
7aed592957 Add full interface of server container as alias 2015-11-26 18:20:25 +01:00
Thomas Müller
8fe878afe9 Merge pull request #20602 from owncloud/fix-installed-apps
Always installed apps includes the hardcoded ones from shipped.json
2015-11-26 16:50:05 +01:00
Thomas Müller
80c43ffc6c Merge pull request #20702 from owncloud/move-user-principal-into-subfolder
Users are available under it's own principal resource named 'principa…
2015-11-26 16:49:49 +01:00
Thomas Müller
19d5059109 Merge pull request #20393 from owncloud/querybuilder-select-with-alias
Add a method to select a field or value with alias
2015-11-26 16:19:20 +01:00
Thomas Müller
97ebc6d80c Merge pull request #20746 from owncloud/untangle-linkToDocs
Untangle the linkToDocs method in OC_Helper
2015-11-26 15:08:28 +01:00
Thomas Müller
4d22c75d49 Merge pull request #20562 from owncloud/comments-interfaces
public interfaces for Comments
2015-11-26 15:06:35 +01:00
Morris Jobke
675417a75c Untangle the linkToDocs method in OC_Helper
* now uses the proper URLGenerator interface
* add comment about DI problems
2015-11-26 13:58:43 +01:00
Thomas Müller
3882cc8ef3 Merge pull request #20744 from owncloud/oc_helper-getMimeType-cleanup
Remove last occurences of OC_Helper::getMimeType()
2015-11-26 12:37:25 +01:00
Arthur Schiwon
d660c6162f proper description for IllegalIDChangeException 2015-11-26 12:15:00 +01:00
Thomas Müller
5a33390a69 Merge pull request #20731 from owncloud/per-storage-updater
Make Cache\Updater per storage
2015-11-26 12:01:44 +01:00
Morris Jobke
0b8296a756 remove unused method 2015-11-26 10:58:30 +01:00
Morris Jobke
4fcab98694 Remove unused internal methods
* removes OC_Helper::mb_substr_replace and OC_Helper::mb_str_replace
* keeps public interface wrapper working as expected
2015-11-26 10:25:43 +01:00
Morris Jobke
9318606faf Remove last occurences of OC_Helper::getMimeType()
* ref #4774
2015-11-26 10:18:32 +01:00
Thomas Müller
b799e42b4e Introduce \OCP\IUser::getEMailAddress() 2015-11-25 22:23:34 +01:00
Thomas Müller
9ec2f8886e Merge pull request #20691 from owncloud/share2.0_di_fixes
[Sharing 2.0] di fixes
2015-11-25 15:25:50 +01:00
Thomas Müller
afe76840f8 Merge pull request #20705 from owncloud/fix_20648
Fix overriding function from 3rdparty warning
2015-11-25 15:24:20 +01:00
Robin Appelman
b025f07fb7 Make Cache\Updater per storage 2015-11-25 14:16:00 +01:00
Thomas Müller
50f6817ce9 Merge pull request #20439 from owncloud/etag-propagate-in-storage
Take submount etag into account for folder etags
2015-11-25 12:49:54 +01:00
Thomas Müller
89b9f5518b Merge pull request #20636 from owncloud/savre-3.0
sabre/dav 3.0 and related
2015-11-24 16:20:48 +01:00
Thomas Müller
4bb346a1e6 Merge pull request #20692 from owncloud/federation_auto_add_servers
auto-add ownClouds to the list of trusted servers
2015-11-24 16:19:39 +01:00
Thomas Müller
ae36c01b95 Adjust sabre changes in core 2015-11-24 15:11:54 +01:00
Roeland Jago Douma
cfdf2b9976 Fix overriding function from 3rdparty warning
Fixes #20648
2015-11-24 13:25:50 +01:00
Björn Schießle
964fa1fce3 use hooks to auto add server to the list of trusted servers once a federated share was created 2015-11-24 11:34:38 +01:00
Thomas Müller
b7b6770d35 Merge pull request #20693 from owncloud/phpdoc_node
Consistent interface declaration OCP\Files\Node
2015-11-24 10:56:53 +01:00
Thomas Müller
d785883eb2 Merge pull request #20682 from owncloud/objectid-to-string
Make sure that object id can be a string
2015-11-24 10:56:34 +01:00
Roeland Jago Douma
85976b7293 [Sharing 2.0] Fix phpdoc etc 2015-11-24 10:26:36 +01:00
Roeland Jago Douma
a2b8483779 [Sharing 2.0] Default share provider only generic DI
No injection of userfolders etc. Only generic DI components
(IRootFolder) etc should be used to make sure we can also run this from
the cli
2015-11-24 10:26:36 +01:00
Roeland Jago Douma
aeae73b364 [Sharing 2.0] Removed unused DI stuff
The share manager etc should not care about filtering stuff. They should
return what is asked for them.
2015-11-24 10:26:36 +01:00
Jenkins for ownCloud
cb69e6c201 [tx-robot] updated from transifex 2015-11-24 01:56:32 -05:00
Arthur Schiwon
ab8937ba6a missing setters for setChildrenCount and setLatestChildDateTime (formerly …Timestamp) 2015-11-23 23:58:22 +01:00
Roeland Jago Douma
5873821b8d Consistent interface declaration 2015-11-23 22:03:19 +01:00
Arthur Schiwon
4005c0337b give creation datetime setter and getter a more meaningful and less misleading name 2015-11-23 17:32:22 +01:00
Arthur Schiwon
d43abd0b8f public interfaces for Comments 2015-11-23 17:21:11 +01:00
Joas Schilling
018bd3ee24 Make sure that object id can be a string 2015-11-23 14:18:15 +01:00
Morris Jobke
728648ad77 Replace new occurences of ini_get with IniWrapper methods 2015-11-23 14:12:36 +01:00
Clark Tomlinson
9caf4ffbfc Replacing ini_get instances with inigetwrapper usages 2015-11-23 14:12:31 +01:00
Thomas Müller
021137d7ae Merge pull request #20679 from owncloud/fixphpdoc
p() supports string as argument
2015-11-23 13:32:46 +01:00
Thomas Müller
df906f475b Merge pull request #20617 from owncloud/fix-usage-of-lastInsertId
lastInsertId() is properly working with Oracle if the table name is p…
2015-11-23 13:29:08 +01:00
Thomas Müller
240cc1c4ea Merge pull request #20543 from owncloud/share2.0_fix_hooks
Move hook and delete children logic to share manager
2015-11-23 13:28:49 +01:00
Joas Schilling
1c7d7288c4 Add a method to select a field or value with alias 2015-11-23 13:28:31 +01:00
Roeland Jago Douma
1360e22d7c [Sharing 2.0] Move hook and delete children logic to share manager
To make sure hooks are always fired and child entries are always
cleaned. This logic is moved to the share manager.

* Updated unit tests
2015-11-23 12:28:54 +01:00
Morris Jobke
7138659080 p() supports string as argument 2015-11-23 12:11:23 +01:00
Thomas Müller
aa660ec232 Throw an exception in case no table name is passed into lastInsertId of the Oracle adapter 2015-11-23 11:44:08 +01:00
Thomas Müller
9f69021691 lastInsertId() is properly working with Oracle if the table name is properly passed in 2015-11-23 11:44:08 +01:00
Joas Schilling
a370c29068 Use a DateTime object instead of a timestamp 2015-11-23 11:41:48 +01:00
Individual IT Services
1835462ec4 reuse code 2015-11-23 11:02:46 +01:00
Thomas Müller
79bbda994b Merge pull request #16902 from owncloud/jsocclient
Web UI uses Webdav instead of ajax/* calls
2015-11-23 09:38:01 +01:00
Thomas Müller
2f89eef334 Merge pull request #20524 from owncloud/pgsql-version-check-error
assume pgsql >=9 if checking the version fails
2015-11-23 09:05:13 +01:00
Jenkins for ownCloud
56e05a90af [tx-robot] updated from transifex 2015-11-23 01:54:53 -05:00
Robin Appelman
2d7c9f0ba9 also match ie11 with Request::USER_AGENT_IE 2015-11-22 16:05:52 +01:00
Vincent Petry
a05e40932c Now using IE8 workaround of davclient.js for all IE versions 2015-11-22 16:05:52 +01:00
Thomas Müller
358858c9e3 Fix undefined HTTP_USER_AGENT 2015-11-22 16:05:50 +01:00
Vincent Petry
fb3d5c7856 Add evert's davclient.js + es6-promise + IE8 workaround
- Add davclient.js lib
- Add es6-promise required by that lib
- Wrote IE8 workaround lib/shim for davclient.js
2015-11-22 16:05:49 +01:00
Jenkins for ownCloud
2321cc4854 [tx-robot] updated from transifex 2015-11-22 01:54:53 -05:00
Thomas Müller
427d107b9f Merge pull request #20614 from owncloud/use-mocks-when-testing-isSharingDisabledForUser
Use mocks when testing isSharingDisabledForUser
2015-11-20 15:22:52 +01:00
Thomas Müller
c86483f3ed Adjust PHPDoc as suggested 2015-11-20 14:38:29 +01:00