Commit Graph

188 Commits

Author SHA1 Message Date
Joas Schilling 0d4ca0e754
Drop foreign key before trying to drop the accounts table
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-07-11 12:14:25 +02:00
Morris Jobke 39c28bd05b
Enterprise update channel
Allows to select the enterprise update channel for instances that have a valid subscription.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-07-10 16:19:34 +02:00
Roeland Jago Douma 3d69f03a6d
Merge pull request #16292 from nextcloud/techdebt/noid/cleanup-outdated-repair-steps
Remove one time repair steps that have already run when updating to 17
2019-07-08 20:32:44 +02:00
Morris Jobke 53d2d95478
Remove one time repair steps that have already run when updating to 17
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-07-08 14:47:26 +02:00
Morris Jobke 13c7810306
Try to delete the cypress folder of the viewer app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-07-08 14:35:27 +02:00
John Molakvoæ (skjnldsv) 49d5030a53
Fix userid casting in notifications
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-06-11 16:53:20 +02:00
Daniel Kesselberg d00566b750
Don't notify admins if no potentially over exposing links found
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-05-26 15:52:19 +02:00
Daniel Kesselberg b693487d64
Add catch for RuntimeException
getDirectoryListing can throw a NotFoundException or a RuntimeException.
The repair step should be skipped if the cache directory is missing so
a catch for both exceptions is required.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-05-17 21:04:01 +02:00
Joas Schilling 093c308b58
Add return types
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-04-16 15:42:21 +02:00
Joas Schilling fb396fe436
Use the querybuilder for the queries
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-04-16 15:42:21 +02:00
Roeland Jago Douma 24d6a28f80
Repair step for link shares
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-04-16 15:42:21 +02:00
Roeland Jago Douma e819e97829
Login flow V2
This adds the new login flow. The desktop client will open up a browser
and poll a returned endpoint at regular intervals to check if the flow
is done.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-02-25 07:24:50 +01:00
Daniel Kesselberg 11a27b247f
Log exception
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-02-07 16:23:18 +01:00
Daniel Kesselberg 382495e26d
Repair step to remove "photo." files created by photocache
Before https://github.com/nextcloud/server/pull/13843 a "photo." file could be created
for unsupported image formats by photocache. Because a file is present but not jpg, png or gif no
photo could be returned for this vcard. These invalid files are removed by this repair step.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-02-07 16:23:18 +01:00
Michael Weimann bf1253cb49
Implement guest avatar endpoint
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2019-02-07 14:23:16 +01:00
John Molakvoæ (skjnldsv) 2be63bcb6a
Log and continue on Dav reader failure
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-12-05 21:13:57 +01:00
Robin Appelman e1a49a223b
Fix SetVcardDatabaseUID when using postgresql
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-11-13 14:26:33 +01:00
John Molakvoæ (skjnldsv) a9eef37456
Clear avatar cache with frontend repair
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-08 08:31:21 +01:00
John Molakvoæ (skjnldsv) 29b72fd1f7
fixup! move migration
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-10-30 14:05:34 +01:00
John Molakvoæ (skjnldsv) 353f5bd469
fixup! move migration
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-10-30 14:03:41 +01:00
John Molakvoæ (skjnldsv) e2ec641c7b
Tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-10-30 13:05:10 +01:00
John Molakvoæ (skjnldsv) 9fbe6774f7
Repair registration and autoload bump
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-10-30 13:05:10 +01:00
John Molakvoæ (skjnldsv) 4dee1e06a3
Repair Step
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-10-30 13:05:10 +01:00
Roeland Jago Douma 0fe115a536
Add repair step
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-07-10 21:27:35 +02:00
Morris Jobke 79801ad263
Suppress potential SQL injection warning as they are false positives
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-07-09 14:55:47 +02:00
Morris Jobke 8a64433ec9
Add repair job for pending cron jobs
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-07-09 14:53:37 +02:00
Joas Schilling 5541d3dd84
Add visio mimetypes
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-06 15:16:21 +02:00
Morris Jobke dc4c158ea7
Background job to clean up old backups of the updater
* a one-time job gets scheduled after each update via a repair job
* the job remove all directories inside data/updater-INSTANCEID/backups except the 3 most recent ones (determined by mtime of the folder)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-06-13 17:43:29 +02:00
Roeland Jago Douma 253f962241
Add the job
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-14 13:25:55 +02:00
Robin Müller 6aa816915a
Don't use double quotes in MySQL queries
MySQL databases with the ANSI_QUOTES mode enabled treat " as an identifier
quote (see https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_ansi_quotes).
So for such databases the 'occ upgrade' fails with an error message like this:
... unknown column 'oc_*' in where clause.

This fix replaces the doulbe quotes with single quotes that should be always
used in MySQL queries to quote literal strings.

Signed-off-by: Robin Müller <robin.mueller@1und1.de>
2018-02-16 15:03:12 +01:00
Julius Härtl b87e5a0f2e
Move depsCache clearing to SCSSCacher/JSCombiner
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-02-03 15:21:51 +01:00
Julius Härtl 7381a81d30
Add repair step to clear frontend related caches
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-02-03 15:21:51 +01:00
Morris Jobke d9b1492e03
Remove old repair steps that aren't executed anymore
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-22 14:51:02 +01:00
Bjoern Schiessle a923e755e6
check if the user still exists before we try to cleanup the previews
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-11-14 20:26:18 +01:00
Morris Jobke eab2b3b7ae
Merge pull request #7027 from nextcloud/Rello-patch-1
Rello patch 1
2017-11-09 09:41:01 +01:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Joas Schilling ba6e5bcc05
Add the return which is being used
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-10-31 14:06:21 +01:00
Rello c5f76785ba
Mapping of m3u, m3u8, pls to audio streams
Signed-Off-By: Rello <Rello@users.noreply.github.com>
2017-10-31 14:05:24 +01:00
Roeland Jago Douma e2139d4b56
Add logrote as a default background job
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-10-24 08:28:06 +02:00
Robin Appelman 7525c387ce
dont run invalid path repair step when upgrading from 11.0.5.2 and later
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-10-03 16:27:26 +02:00
Joas Schilling 29e1aa57e1
Ask the schema whether the table and column exist
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-08 11:45:16 +02:00
Morris Jobke 139f9bd3ca Merge pull request #6331 from nextcloud/update-repair-step
Generate system wide key pair (update repair step after backport)
2017-09-04 11:59:34 +02:00
Bjoern Schiessle e039a4c191
move repair step to stable12
because we decided to backport it the repair step needs to be executed
already on stable12

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-09-01 11:05:11 +02:00
Thomas Ebert 93d539b0cf Add mimetype support for .URL (Windows) and .webloc (macOS) files. Update places/link svg. Add filetype/link icon. Add repair step for mime types.
Signed-off-by: Thomas Ebert <thomas.ebert@te-online.net>
2017-08-31 16:53:07 +02:00
Björn Schießle 60ee450809 Merge pull request #5870 from nextcloud/generate-system-wide-key-pair
extend the identity proof manager to allow system wide key pairs
2017-08-24 18:36:35 +02:00
Roeland Jago Douma 8ea434d2d0 Merge pull request #6004 from nextcloud/forward-5902-repair-drop-account-terms-on-oc-migration
[13] Repair step: drop account terms on oc migration
2017-08-10 21:18:06 +02:00
Bjoern Schiessle bae5be3dc1
add prefix to user and system keys to avoid name collisions
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-08-10 14:27:35 +02:00
Joas Schilling 66b61eb67d
Use indexed column path_hash to find the parent
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-09 10:56:16 +02:00
Joas Schilling 40b47f13df
Add a repair step to drop the account_terms table on oc migration
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-07 12:08:36 +02:00
Joas Schilling 78412fda9c
Add a method to compare empty strings with an expression
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-02 09:50:41 +02:00
Joas Schilling 100fe07f5d
Fix repair step for oracle...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-02 09:48:16 +02:00
Joas Schilling a5b0308713
Use selectAlias()
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-02 09:48:16 +02:00
Joas Schilling 20f8d1094a
Can not insert auto increment on oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-02 09:48:16 +02:00
Roeland Jago Douma 5f227bd93b
More phpstorm inspection fixes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-24 11:39:29 +02:00
Robin Appelman 06a4d6b5b9 Also repair storage id's when repairing invalid entries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-21 14:06:13 +02:00
Lukas Reschke 3d2600b039
Add Phan plugin to check for SQL injections
This adds a phan plugin which checks for SQL injections on code using our QueryBuilder, while it isn't perfect it should already catch most potential issues.

As always, static analysis will sometimes have false positives and this is also here the case. So in some cases the analyzer just doesn't know if something is potential user input or not, thus I had to add some `@suppress SqlInjectionChecker` in front of those potential injections.

The Phan plugin hasn't the most awesome code but it works and I also added a file with test cases.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-07-20 22:48:13 +02:00
Robin Appelman 8b58b4c2a7
Fix invalid path repair step not getting all invalid entries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-18 14:01:49 +02:00
Morris Jobke 01466ab840 Merge pull request #5715 from nextcloud/master-5655
Fixed repair step
2017-07-13 19:30:05 +02:00
Robin Appelman 350e036c56 chunk getting invalid paths and reuse queries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-13 16:37:38 +02:00
Robin Appelman 4a727a578c use a generator instead of fetching all rows at once
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-07-13 16:37:34 +02:00
Joas Schilling c6b7204fcb
Don't throw an error when the table doesn't exist
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-12 15:35:24 +02:00
Morris Jobke b4a221f9be Merge pull request #5424 from nextcloud/moveFromCache-from-shared
fix moving folders out of a cache jail
2017-07-06 18:31:18 +02:00
Robin Appelman 601362e164
adjust to moved repair step
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-06-29 14:45:08 +02:00
Morris Jobke 846e62c225 Run repair step only once
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-06-22 15:43:59 -05:00
Robin Appelman d3c20eefca
Add repair step for invalid paths
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-06-21 15:52:27 +02:00
Arthur Schiwon c1d9565131
added kml, kmz, tcx types as well while at it
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-14 11:02:05 +02:00
Arthur Schiwon addcda9325
add geospatial mime types repair step
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-06-14 10:48:56 +02:00
Joas Schilling 682a57d50e
Copy avatars to the new location
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-18 10:49:04 +02:00
Joas Schilling c90d56748f
We want to see 1 in 100 messages, not all but the 100th
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-18 10:49:04 +02:00
Joas Schilling 2259140e3b
Add some more casting
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-18 10:49:04 +02:00
Joas Schilling 0e325756c3
Avoid problems for some DBs by removing the table completly
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-18 10:49:03 +02:00
Joas Schilling c6a5a25b48
Add a migration step to save the data from the accounts table before migrating
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-05-18 10:48:54 +02:00
Lukas Reschke 0c5a48c4a4
Add tests for repairstep
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-26 20:07:52 +02:00
Lukas Reschke 47cd976035
Add app bundles
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-04-26 20:07:49 +02:00
Stefan Weil c9e08a6445 Add repair steps for new image mime types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-25 18:56:23 +02:00
Morris Jobke c54a59d51e
Remove unused use statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-22 19:23:31 -05:00
Robin Appelman 11c1e5dd86
fix whitespace in cleantags
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-30 12:49:09 +02:00
Morris Jobke 713f684a8b
Adding tests for 4 byte unicode characters
* success on SQLite and Postgres
* failure on MySQL due to the limited charset that only supports up to 3 bytes

Add config option to update charset of mysql to utf8mb4

* fully optional
* requires additional options set in the database

only disable unicode test on mysql

Fixing ctor call

Adding docker based unit test execution for mysql utf8mb4

Add mysqlmb4 test configuration to Jenkinsfile

fix collation on utf8mb4

Properly setup charset and collation in the doctrine connection

Allow files containing 4-byte chars in case the database supports it

During setup of a mysql database we try to detect if charset 'utf8mb4' can be used

Fix mysql settings

Add console command to migrate the charset

Set ROW_FORMAT before setting collation to mb4

Also select tables with wrong collation

Faster MySQL docker

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-21 16:42:12 -06:00
Morris Jobke d99ce3971b
Namespace and array syntax fixes
* minor fixes in preparation of a bigger DB and config PR

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-19 14:52:54 -06:00
Joas Schilling 0beb78517f
Fix DI
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-03 12:20:02 +01:00
Morris Jobke 0b12eb0640
Execute UpdateLanguageCode only once
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-02 21:53:36 -06:00
Joas Schilling ba472f7ce0
Fix table name and add a test for more than 1 entries
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-02 09:11:47 +01:00
Morris Jobke 1bcd396679
Change language code for languages with only one translation
* then the language is not that specific and get also matched for fi
* fallback from fi_FI to fi is supported - the other way around not
* contains repair script
* contains tests for repair script
* fixes #869

Order results to make postgres happy

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-01 22:35:28 -06:00
Morris Jobke 2bbf3b18d9
cleanup old and not needed repair steps to speed up the update
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-22 22:35:18 -06:00
Morris Jobke c2d3e12e23
Remove unneeded UpdateCertificateStore.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-22 21:26:59 -06:00
Joas Schilling ade91c8fe2
Recognize .bat and .cmd files
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-02-10 14:25:25 +01:00
blizzz 64e9a1aec0 Merge pull request #3176 from nextcloud/default-value-datadir
Add proper default value for datadir
2017-01-30 13:01:24 +01:00
Robin Appelman c76fe2b4f5
remote now unneeded AvatarPermissions repair step
Avatars are now stored in appdata

Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-26 19:24:55 +01:00
Morris Jobke a4ad8af6e3
Add proper default value for datadir
* better safe than sorry
* fixes #3091

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-01-19 19:49:41 -06:00
Joas Schilling 77b5d7bc86
Change the row-format before changing the collation
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-12 16:54:29 +01:00
Joas Schilling 22e74cf5ac
Use the new expression
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-01-05 14:30:25 +01:00
Lukas Reschke 5d01004368
Adjust version to Nextcloud
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-01-05 14:30:25 +01:00
Vincent Petry 7baa4ea1a4
Add repair step to fix file share permissions
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-01-05 14:30:22 +01:00
Vincent Petry 252eddadd9
Remove obsolete RepairLegacyStorages repair step
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-19 17:45:46 +01:00
Joas Schilling d5df692481
Add a repair step to fix broken mounts
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-12-13 13:54:18 +01:00
Roeland Jago Douma e3d6b4fe1c
Fixed correct filename of MoveAvatarsBackgroundJob
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-12-13 12:46:58 +01:00
Roeland Jago Douma 542f1a7e0b Merge pull request #2405 from nextcloud/add-avatar-job-once
Execute MoveAvatars repair step only once
2016-11-30 11:36:01 +01:00
Morris Jobke 69db58250a
Execute MoveAvatars repair step only once
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-11-29 16:55:13 +01:00
Roeland Jago Douma 78a318d388
Add test if repair step is already done
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-19 20:26:53 +01:00
Roeland Jago Douma ccb05dbb17
Adds background job to cleanup all previews.
* A repair step that inserts a background job for each user
* Each background job will delete for 15 seconds if it takes longer we
reschedule. This is done so instances that don't use the system cron
won't time out.
* Added tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-19 20:14:44 +01:00