summaryrefslogtreecommitdiffstats
path: root/lib/private/Installer.php
Commit message (Collapse)AuthorAgeFilesLines
* disable timeout on app install via cliArthur Schiwon2020-02-121-6/+13
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Increase the timeout for app downloadsJoas Schilling2020-01-201-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow to force enable apps via CLIJoas Schilling2019-12-131-2/+3
| | | | | | Co-authored-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-2/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Run repair steps when enabling an app that has already been installedJulius Härtl2019-06-051-0/+8
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Check if elements are set in installerRoeland Jago Douma2019-03-221-0/+4
| | | | | | | Since we now have all the apps from the appstore we need to do a bit more checking. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* allow enforcing apps to ignore the max versionRoeland Jago Douma2019-03-201-2/+5
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* There is no update available if the app didnt have a version (aka was not ↵Joas Schilling2018-08-021-1/+1
| | | | | | installed) Signed-off-by: Joas Schilling <coding@schilljs.com>
* move log constants to ILoggerArthur Schiwon2018-04-261-2/+2
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Remove a check for an unused variableMorris Jobke2018-04-231-3/+1
| | | | | | | | Left over from a refactoring https://github.com/nextcloud/server/pull/1940 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use isInstalled of AppManger instead of reimplement itMorris Jobke2018-03-211-15/+6
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Dont use $info as array when its not an arrayJoas Schilling2018-02-221-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix app version to be always string and neither array nor nullMorris Jobke2018-02-171-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove unused import statementsMorris Jobke2018-02-141-5/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove OC_App::removeAppJulius Härtl2018-01-311-0/+3
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Do not cache the settings/sections in the database anymoreJoas Schilling2018-01-291-9/+0
| | | | | | | This caused more troubles then it had benefits, especially when an app got disabled or was removed without being disabled. Signed-off-by: Joas Schilling <coding@schilljs.com>
* Remove unneeded semicolon and parenthesesMorris Jobke2018-01-261-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use index based string access for substr with length of 1Morris Jobke2018-01-261-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Properly log the full exception instead of only the messageMorris Jobke2018-01-231-1/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove IAppConfig::getValueRoeland Jago Douma2018-01-171-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #7505 from nextcloud/do-not-update-if-app-comes-from-gitMorris Jobke2017-12-181-0/+20
|\ | | | | Do not update apps if it comes from git
| * Up checkJohn Molakvoæ (skjnldsv)2017-12-141-4/+4
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
| * Do not update apps if it comes from gitJohn Molakvoæ (skjnldsv)2017-12-141-0/+20
| | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* | Use cached app listMorris Jobke2017-12-141-2/+2
|/ | | | | | Followup to #7264 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #7264 from nextcloud/cache-fetched-appsLukas Reschke2017-11-271-11/+14
|\ | | | | Cache fetched apps in update check
| * Make isUpdateAvailable non-staticMorris Jobke2017-11-251-13/+12
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
| * Cache fetched apps in update checkMorris Jobke2017-11-251-1/+5
| | | | | | | | | | | | The code tried to find the apps with updates and thus was called for every available app. This caused to get the full appstore content as often as apps are available. The appstore request itself was cached nevertheless in an appdata dir, but with an object storage this is still a lot of round trips to read this cached result. Thus the instantiated list is now cached in a static variable (because it's a static method call). Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Remove unused checkCode methodMorris Jobke2017-11-241-17/+0
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #6788 from staabm/masterLukas Reschke2017-11-081-1/+1
|\ | | | | Prevent XSS in links which open a new browser window
| * Prevent XSS in links which open a new browser windowMarkus Staab2017-10-191-1/+1
| |
* | Run updated license header updaterMorris Jobke2017-11-071-1/+1
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Change @georgehrke's emailMorris Jobke2017-11-061-1/+1
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Update license headersMorris Jobke2017-11-061-7/+1
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Check whether an app archive can be extractedChristoph Wurst2017-09-201-1/+8
| | | | | | | | If extraction fails we should not continue the installation/update process as the info.xml cannot be loaded and an unrelated error occurs. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Register autoloading before running migrationsJoas Schilling2017-07-071-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Register autoloading before running migrationsJoas Schilling2017-07-051-1/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use migrations when there is no database.xmlJoas Schilling2017-07-051-0/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Remove OC_App:installAppMorris Jobke2017-05-151-1/+27
| | | | | | | | | * uses Installer->installApp now * removes unused code * fixes #4453 * added some additional checks Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add app bundlesLukas Reschke2017-04-261-1/+32
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Remove unused use statementsMorris Jobke2017-04-221-1/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Don't use cached informations for app versionLukas Reschke2016-12-091-1/+1
| | | | | | | | | | | | | 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>
* Prevent downgrade attacks for appsLukas Reschke2016-11-111-0/+14
| | | | | | | | We should verify the app versions when installing a new update, otherwise this could result in downgrade attacks when an attacker just copies the old signature. Plus it prevents the case that in case of a bug in the appstore actually an older version gets installed. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Correctly catch the "soft errors" nowJoas Schilling2016-11-091-4/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use a better error message and point the users to the support channelsJoas Schilling2016-11-091-1/+9
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add tests for installer methodLukas Reschke2016-10-311-26/+28
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Move to non-static versionLukas Reschke2016-10-311-1/+2
| | | | | | The static version is used nowhere in the code and just decreases coverage Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Use findAppInDirectoriesLukas Reschke2016-10-311-1/+6
| | | | | | The other function doesn't work if the appstore is disabled Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Add update supportLukas Reschke2016-10-311-248/+67
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Add support for CRLLukas Reschke2016-10-311-4/+24
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Replace with exception instead of boolean return valueLukas Reschke2016-10-311-20/+8
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>