aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Prevent loading images that would require too much memory.Joachim Bauch2022-01-112-0/+17
| | | | | | | | | | | | | For most image formats, the header specifies the width/height. PHP allocates an image object from that size, even if the actual image data is much smaller. This image object size is not limited by the limit configured in PHP. The memory limit can be configured through "config.php" setting "preview_max_memory" and defaults to 128 MBytes which should be enough for most images without filling up all memory. Signed-off-by: Joachim Bauch <bauch@struktur.de>
* Fix email verificationChristopher Ng2022-01-071-0/+39
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* fix testsRobin Appelman2021-12-021-20/+0
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* add method to shorten a string to given byte size to UtilsArthur Schiwon2021-11-261-0/+7
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Improve normalizer detecting IPv4 inside of IPv6Vincent Petry2021-11-231-1/+9
| | | | | | | The subnet for an IPv4 address inside of IPv6 is now returned in its IPv4 form. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Fix getting subnet of ipv4 mapped ipv6 addressesVincent Petry2021-11-231-0/+4
| | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Normalize directory entries in Encoding wrapperVincent Petry2021-11-191-1/+43
| | | | | | | | | | | | Directory entry file names are now normalized in getMetaData(), getDirectoryContents() and opendir(). This makes the scanner work properly as it assumes pre-normalized names. In case the names were not normalized, the scanner will now skip the entries and display a warning when applicable. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* OC_Util: Add fallbacks to check if current locale is UTF8Naoto Kobayashi2021-11-161-2/+4
| | | | | | | | | Using escapeshellcmd to get current locale causes error if the function is disabled. Add fallbacks to prevent the error. Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
* Add check whether escapeshellcmd behaves the same as basenameNaoto Kobayashi2021-11-161-0/+2
| | | | Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
* Fix missing setlocale with php 8Naoto Kobayashi2021-11-161-0/+8
| | | | | | | | | When php version = 8, basename('§') does not bug even if LC_ALL is non-UTF-8 locale. This cause OC_Util::isSetLocaleWorking() to skip setlocale("C.UTF-8"). Fix it by using escapeshellcmd instead of basename. Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
* Fix branch selection in stable23Joas Schilling2021-11-151-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix unit testsJoas Schilling2021-11-121-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add unit test for share enumeration methodJoas Schilling2021-11-091-1/+79
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Move common logic to share managerJoas Schilling2021-11-091-10/+25
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #29524 from nextcloud/bugfix/noid/fix-phpunit-warningsChristoph Wurst2021-11-021-0/+1
|\ | | | | Fix missing import of ILogger
| * Fix missing import of ILoggerJoas Schilling2021-11-021-0/+1
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Enable Avatar tests as well for PHP>=8Côme Chilliet2021-10-281-20/+0
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Revert "Do not run image tests on php8"Côme Chilliet2021-10-281-68/+0
|/ | | | | | This reverts commit d690f909284ae4bb4dee7d00318104ee76720bfa. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add an OCP for trusted domain helperJoas Schilling2021-10-281-10/+23
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #27440 from nextcloud/is-file-handleJohn Molakvoæ2021-10-231-2/+2
|\
| * Update Testsacsfer2021-10-221-1/+1
| |
| * Tests updateacsfer2021-08-151-1/+1
| |
* | Merge pull request #29363 from nextcloud/fair-use-pushJohn Molakvoæ2021-10-233-16/+111
|\ \
| * | add check isFairUseOfFreePushService on loginVitor Mattos2021-10-231-7/+25
| | | | | | | | | | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
| * | Fair use of push notificationsJoas Schilling2021-10-232-9/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | We want to keep offering our push notification service for free, but large users overload our infrastructure. For this reason we have to rate-limit the use of push notifications. If you need this feature, consider setting up your own push server or using Nextcloud Enterprise. Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | fix populating account array with missing default valuesArthur Schiwon2021-10-221-9/+7
|/ / | | | | | | | | | | | | | | - both $userData and $defaultUserData have numeric indices - each element contains at least the name and other fields - appending the missing data array is sufficient Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Merge pull request #29220 from nextcloud/s3-external-listJohn Molakvoæ2021-10-221-0/+3
|\ \
| * | ciRobin Appelman2021-10-151-0/+3
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | Merge pull request #26725 from ↵John Molakvoæ2021-10-221-0/+1
|\ \ \ | | | | | | | | | | | | nextcloud/fix-federated-scope-not-shown-when-public-addressbook-upload-is-disabled
| * | | Add missing scope to testDaniel Calviño Sánchez2021-08-181-0/+1
| | | | | | | | | | | | | | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* | | | Merge pull request #26347 from J0WI/clean-path-regexJohn Molakvoæ2021-10-221-5/+22
|\ \ \ \
| * | | | Cleaner normalizePath regexJ0WI2021-03-271-5/+22
| | | | | | | | | | | | | | | | | | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* | | | | Merge pull request #29344 from nextcloud/dependabot/composer/doctrine/dbal-3.1.3John Molakvoæ2021-10-221-7/+3
|\ \ \ \ \
| * | | | | Bump doctrine/dbal from 3.0.0 to 3.1.3Christoph Wurst2021-10-221-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | | | | | Prevent duplicate auth token activity updatesChristoph Wurst2021-10-221-7/+6
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The auth token activity logic works as follows * Read auth token * Compare last activity time stamp to current time * Update auth token activity if it's older than x seconds This works fine in isolation but with concurrency that means that occasionally the same token is read simultaneously by two processes and both of these processes will trigger an update of the same row. Affectively the second update doesn't add much value. It might set the time stamp to the exact same time stamp or one a few seconds later. But the last activity is no precise science, we don't need this accuracy. This patch changes the UPDATE query to include the expected value in a comparison with the current data. This results in an affected row when the data in the DB still has an old time stamp, but won't affect a row if the time stamp is (nearly) up to date. This is a micro optimization and will possibly not show any significant performance improvement. Yet in setups with a DB cluster it means that the write node has to send fewer changes to the read nodes due to the lower number of actual changes. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | | | | Merge pull request #29256 from ↵Julien Veyssier2021-10-212-41/+67
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | nextcloud/fix/noid/harmonize-appstoreenabled-check Fix appstoreenabled check
| * | | | | Fix unit testsJoas Schilling2021-10-212-41/+67
| | |_|/ / | |/| | | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | | | Change origin field to appIdJoas Schilling2021-10-201-3/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | | | Do not remove current user on findOneJohn Molakvoæ2021-10-201-14/+13
| | | | | | | | | | | | | | | | | | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* | | | | Add appName to contactsmenu action APIJohn Molakvoæ2021-10-201-0/+19
| | | | | | | | | | | | | | | | | | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* | | | | Profile backendChristopher Ng2021-10-194-16/+40
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* | | | | Add new account propertiesChristopher Ng2021-10-191-6/+192
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - New properties - Organisation - Role - Headline - Biography - Profile Enabled property - Fix errors with building default account properties - Fix L10N factory method `getLanguage` not public error - Update tests Signed-off-by: Christopher Ng <chrng8@gmail.com>
* | | | Merge pull request #27217 from ↵John Molakvoæ2021-10-151-0/+7
|\ \ \ \ | | | | | | | | | | | | | | | nextcloud/techdebt/noid/make-debugging-a-cron-job-easier
| * | | | Move queries to the joblistJoas Schilling2021-10-141-0/+7
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | | | Merge pull request #29235 from nextcloud/feat/appstore/enterpriseJohn Molakvoæ2021-10-153-5/+11
|\ \ \ \ \
| * | | | | Send the subscription key to the appstore requestsJohn Molakvoæ2021-10-143-5/+11
| |/ / / / | | | | | | | | | | | | | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* | | | | Merge pull request #29231 from nextcloud/fix/calendar-providers-instancesChristoph Wurst2021-10-141-1/+13
|\ \ \ \ \ | | | | | | | | | | | | Build instances of the calendar providers before using them
| * | | | | Build instances of the calendar providers before using themChristoph Wurst2021-10-141-1/+13
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What we get from the registration context are only the class names. We still have to load the classes before we can use them. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | | | | Merge pull request #29157 from nextcloud/enh/opendocumentJulius Härtl2021-10-142-2/+21
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Fix integrity checker testsJulius Härtl2021-10-132-2/+21
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>