summaryrefslogtreecommitdiffstats
path: root/tests/lib
Commit message (Collapse)AuthorAgeFilesLines
* Filter out old files when trying to get recent filesCarl Schwan2022-09-081-4/+4
| | | | | | | Only do so when asking for less than 100 files and having an offset equal to 0. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix logging data context to fileThomas Citharel2022-08-302-10/+51
| | | | | | | | | | | | | It was only logged when an exception was provided or when using logData (which is not being much used). We make sure the interpolated parameters are not logged. Only tested with file write logger, but shouldn't work differently. Crash reporters always had the context. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Merge pull request #33443 from nextcloud/backport/33407/stable23blizzz2022-08-041-4/+87
|\ | | | | [stable23] Handle one time and large passwords
| * Handle one time and large passwordsCarl Schwan2022-08-031-4/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For passwords bigger than 250 characters, use a bigger key since the performance impact is minor (around one second to encrypt the password). For passwords bigger than 470 characters, give up earlier and throw exeception recommanding admin to either enable the previously enabled configuration or use smaller passwords. This adds an option to disable storing passwords in the database. This might be desirable when using single use token as passwords or very large passwords. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | Use Symfony IpUtils to check for local IP rangesCôme Chilliet2022-07-261-0/+5
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix reading blob data as resourceThomas Citharel2022-07-251-0/+17
| | | | | | | | | | | | | | | | PostgreSQL returns data as resource when using IQueryBuilder::PARAM_LOB (which is used for QBMapper). Previously we just converted this resource using settype, which produced things like "Resource id #14" instead of the actual resource data. Now we read the stream correctly if the returned data is a resource See context at #22472 Fixes #22439 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Allow to disable password policy enforcement for selected groupsCarl Schwan2022-07-051-0/+34
| | | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu> Co-authored-by: Vincent Petry <vincent@nextcloud.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Merge pull request #33004 from nextcloud/backport/32719/stable23blizzz2022-07-051-0/+311
|\ | | | | [stable23] Fix email shares not being shown to other users
| * Fix email shares not being shown to other usersRichard Steinmetz2022-06-241-0/+311
| | | | | | | | Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* | Rename setting name to reduce its lengthLouis Chemineau2022-06-281-1/+1
|/ | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Merge pull request #32322 from nextcloud/backport/stable22/share_search_tweaksLouis2022-06-231-18/+133
|\ | | | | [stable23] Add share search tweaks
| * Add settings to ignore second display name in searchLouis Chemineau2022-06-071-18/+133
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | make placeholder a const for reuseArthur Schiwon2022-06-171-1/+1
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | fix overwriting original vars when loggingArthur Schiwon2022-06-171-1/+2
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | add serializer testArthur Schiwon2022-06-171-0/+67
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Merge pull request #32658 from nextcloud/backport/32655/stable23Vincent Petry2022-06-101-12/+30
|\ \ | | | | | | [stable23] Handle non existing settings again
| * | Fix unit testsJoas Schilling2022-05-311-12/+30
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | Test all scopesChristopher Ng2022-06-081-5/+8
| | | | | | | | | | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* | | Fix get avatar authorizationChristopher Ng2022-06-081-0/+20
| |/ |/| | | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* | Add unit tests for encryption's isSystemWideMountPointVincent Petry2022-06-021-0/+41
|/ | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Fix user agent trimming on installationJoas Schilling2022-05-161-2/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add a unit test for translation with trailing colonJoas Schilling2022-04-261-0/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Get not only time-sensitive next job from list but anyKirill Popov2022-04-251-1/+1
| | | | | | | Before the change webcron used to select **only** time-sensitive tasks. Signed-off-by: Kirill Popov <kirill.s.popov@gmail.com>
* Merge pull request #31678 from nextcloud/backport/31658/stable23Joas Schilling2022-04-143-73/+89
|\ | | | | [stable23] Limit the length of app password names
| * Fix unit testsJoas Schilling2022-03-232-73/+58
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
| * Limit the length of app password namesJoas Schilling2022-03-231-0/+31
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Merge pull request #31453 from nextcloud/s3-primary-ci-23blizzz2022-04-141-0/+12
|\ \ | | | | | | [stable23] Run tests with primary object storage in CI + large upload fixes
| * | skip localstorage dependend user test when not using local user storageRobin Appelman2022-03-101-0/+12
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | confirm user is internal to globalscaleMaxence Lange2022-04-121-0/+12
| | | | | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* | Add profile default setting for adminChristopher Ng2022-03-251-0/+6
| | | | | | | | | | | | Signed-off-by: Christopher Ng <chrng8@gmail.com> (cherry picked from commit 108abd77ed0ee29bca4019f6a212ba1b2bdad5e7) Signed-off-by: Christopher Ng <chrng8@gmail.com>
* | Add global profile toggle configChristopher Ng2022-03-251-5/+5
|/ | | | | Signed-off-by: Christopher Ng <chrng8@gmail.com> (cherry picked from commit 1fc0b4320c8921ad59bf4d41a88bf9936e1f653d)
* Merge pull request #31098 from nextcloud/backport/30942/stable23Vincent Petry2022-03-011-13/+9
|\ | | | | [stable23] only setup part of the filesystem for appdata requests
| * fix fs cache test user setupRobin Appelman2022-02-161-13/+9
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Allow apps to specify if their background job can be delayedJoas Schilling2022-02-221-1/+2
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #30949 from ↵Vincent Petry2022-02-162-2/+10
|\ | | | | | | | | nextcloud/bugfix/noid/allow-to-disable-v1-authtokens [stable23] Allow to disable AuthToken v1
| * Fix unit testsJoas Schilling2022-01-312-2/+10
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Fix psalm not runningCarl Schwan2022-01-2718-126/+119
| | | | | | | | | | | | | | | | | | | | The issue was that we were using psalm/phar instead of vimeo/psalm. This caused issue with the custom psalm plugin in buildd/psalm. This is using the opportunity to also update the psalm version from 3.8 to 3.17 and the php-cs-fixer too. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | Merge pull request #30659 from nextcloud/backport/29622/stable23Julius Härtl2022-01-142-17/+41
|\ \
| * | Implement multibucket shift for ObjectStoreJohn Molakvoæ2022-01-142-17/+41
| | | | | | | | | | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* | | Fix idn emails not working in sharesCarl Schwan2022-01-131-8/+50
|/ / | | | | | | | | | | | | | | And add check before sending email that email address is valid Fix #30595 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | Merge pull request #30611 from nextcloud/backport/30588/stable23Joas Schilling2022-01-121-1/+1
|\ \ | | | | | | [stable23] Fix undefined/unset scope in account properties
| * | Fix testJoas Schilling2022-01-111-1/+1
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | Prevent loading images that would require too much memory.Joachim Bauch2022-01-111-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>