Commit Graph

4660 Commits (efbbdb79df9cc099ab0c9944901ca2bd87b3611f)

Author SHA1 Message Date
Joas Schilling efbbdb79df Limit the length of app password names
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-05-13 18:34:18 +07:00
Joas Schilling d106ac7567 Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-16 10:31:08 +07:00
John Molakvoæ 301ecd0fc0
Merge pull request #30660 from nextcloud/backport/29622/stable21 2022-01-20 10:22:22 +07:00
John Molakvoæ 6b94630f44
Implement multibucket shift for ObjectStore
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-01-14 08:39:37 +07:00
Carl Schwan 2f10bc14f7
Fix idn emails not working in shares
And add check before sending email that email address is valid

Fix #30595

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 17:19:28 +07:00
Joachim Bauch 3ad763cf18 Prevent loading images that would require too much memory.
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>
2022-01-11 14:48:27 +07:00
Louis f41c1fffff
Merge pull request #30056 from nextcloud/backport/29735/stable21
[stable21] find users for background scan one by one
2021-12-08 18:06:00 +07:00
John Molakvoæ fda86f8c8c
Merge pull request #29834 from nextcloud/carl/bugfix/file-search-21 2021-12-06 14:51:55 +07:00
Robin Appelman d89ce5a410 fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-12-02 20:00:45 +07:00
Carl Schwan 8f9d1b31df
Fix search results filtering
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-11-26 16:30:47 +07:00
Vincent Petry d9a5f2867e Improve normalizer detecting IPv4 inside of IPv6
The subnet for an IPv4 address inside of IPv6 is now returned in its
IPv4 form.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-23 10:28:20 +07:00
Vincent Petry 87af149292 Fix getting subnet of ipv4 mapped ipv6 addresses
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-11-23 10:28:20 +07:00
Vincent Petry ca37664887 Normalize directory entries in Encoding wrapper
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>
2021-11-19 14:51:39 +07:00
Naoto Kobayashi b9b1ef1319 OC_Util: Add fallbacks to check if current locale is UTF8
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>
2021-11-17 09:01:40 +07:00
Naoto Kobayashi 7bb43a1e13 Add check whether escapeshellcmd behaves the same as basename
Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
2021-11-17 09:01:40 +07:00
Naoto Kobayashi e9c6de5c79 Fix missing setlocale with php 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>
2021-11-17 09:01:40 +07:00
Joas Schilling 96c8e0dad3
Apply changes from master's update to 3.1.3
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-15 19:07:11 +07:00
Côme Chilliet dde1880be7
Merge branch 'stable21' into backport/29479/stable21
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-04 09:21:48 +07:00
John Molakvoæ d87894a287
Merge pull request #29384 from nextcloud/backport/26725/stable21 2021-11-03 10:17:18 +07:00
Côme Chilliet 8bc3bed093
Enable Avatar tests as well for PHP>=8
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-02 11:49:52 +07:00
Côme Chilliet efd689ea82
Revert "Do not run image tests on php8"
This reverts commit d690f90928.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-02 11:49:41 +07:00
MichaIng e250aef6b4
Merge pull request #29416 from nextcloud/backport/27440/stable21
[stable21] Handle files with `is_file` instead of `file_exists`
2021-10-30 00:19:35 +07:00
Robin Appelman cf6da08f00
ci
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-26 14:46:21 +07:00
acsfer 8610099c5f Update Tests 2021-10-23 09:28:26 +07:00
acsfer b3482b1d06 Tests update 2021-10-23 09:28:25 +07:00
Daniel Calviño Sánchez c628411a71 Add missing scope to test
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2021-10-22 09:55:21 +07:00
Daniel Kesselberg 98d3836650
explicitly close source stream on local storage
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-10-08 14:30:27 +07:00
Daniel Kesselberg 32ee325887
Add email addresses to contacts menu
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-09-17 10:05:54 +07:00
Lukas Reschke f416cacc64 Add database ratelimiting backend
In case no distributed memory cache is specified this adds
a database backend for ratelimit purposes.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-09-13 16:45:54 +07:00
Jasper Knockaert 5341807b14 Update EncryptionTest.php 2021-09-03 13:40:41 +07:00
Jasper Knockaert bbf191bdef 2nd attempt to fix tests 2021-09-03 13:40:41 +07:00
Jasper Knockaert ab14c0322b attemtp to fix test 2021-09-03 13:40:41 +07:00
Jonas Meurer d528243c0c Use IURLGenerator function to get value of `\OC::$WEBROOT` global
Signed-off-by: Jonas Meurer <jonas@freesources.org>
2021-08-16 13:12:47 +07:00
Robin Appelman ca3a6251d2
better cleanup of user files on user deletion
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-08-12 18:16:51 +07:00
Robin Appelman 4c954e7dd1 fix Folder->getById() when a single storage is mounted multiple times
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-08-09 17:32:20 +07:00
Robin Appelman 96b9aeecd5
add test for searching within a "root jail"
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-07-29 13:25:11 +07:00
Julius Härtl 055f722052 Let memory limit set in tests fit the used amount
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-07-22 16:44:24 +07:00
Julius Härtl 4c9686a969 Run s3 tests again
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-07-05 09:58:37 +07:00
Morris Jobke 5412605219
Merge pull request #27359 from nextcloud/backport/27354/stable21
[stable21] Escape filename in Content-Disposition
2021-06-07 10:37:45 +07:00
Robin Appelman 287edf0e61
Set umask before operations that create local files
this solves issues where "other php stuff" is messing with the umask

Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-06-04 15:43:16 +07:00
Lukas Reschke d838108dea Escape filename in Content-Disposition
We should escape all occurences of ' and \ in here.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-06-02 19:17:38 +07:00
Joas Schilling 6a8d6beb57 Fix ratelimit template
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-27 13:40:12 +07:00
Joas Schilling 2c1218826d Validate the website field input to be a valid URL
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-26 11:58:56 +07:00
Joas Schilling f600fbf364 Make Testcase class compatible with phpunit-9.5
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-22 09:34:22 +07:00
Vincent Petry fe0f1c792c
Fix empty password check for mail shares
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-04-19 15:44:26 +07:00
Lukas Reschke b5838c5248 Increase subnet matcher
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2021-04-12 10:36:25 +07:00
Lukas Reschke d66e86c56c
Merge pull request #26400 from nextcloud/backport/26061/stable21
[stable21] Log and continue when failing to update encryption keys during for individual files
2021-04-06 13:43:34 +07:00
Julius Härtl 89a19a338e Get the parent directory before creating a file from a template
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-04-01 13:31:55 +07:00
Julius Härtl d6bad03a5c Log and continue when failing to update encryption keys during for individual files
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-04-01 07:56:41 +07:00
Arthur Schiwon caec3a8cee gracefully handle deleteFromSelf when share is already gone
- handling race conditions

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-03-30 20:26:29 +07:00