Commit graph

6353 commits

Author SHA1 Message Date
Arthur Schiwon
a3a05f4a06
Merge pull request #36900 from nextcloud/backport/stable24/36837
[stable24] fix(SystemTagManager): Truncate overlong tag names
2023-03-15 14:41:10 +01:00
Arthur Schiwon
0a9f73caa8
Merge pull request #36743 from nextcloud/backport/35419/stable24
[stable24] Fix login loop if login CSRF fails and user is not logged in
2023-03-15 14:40:02 +01:00
Julien Veyssier
5b08f8481c
manual backport of #35057
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2023-03-15 10:19:35 +01:00
Simon L
ea6b4c69c9
Merge pull request #37004 from nextcloud/backport/36803/stable24
[stable24] [db]: Remove not supported column comments for SQLite
2023-03-14 13:14:06 +01:00
Ferdinand Thiessen
2f0c60dccc tests(db): Add test case to ensure column comments work
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
2023-03-02 11:57:43 +00:00
Marcel Klehr
60395a898e fix(SystemTagManager): Truncate overlong tag names
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-02-28 14:52:47 +01:00
Christoph Wurst
2b868af78b fix(client-login-flow): Handle missing stateToken gracefully
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-02-27 16:09:56 +00:00
Julius Härtl
a04ed00f63 fix: Avoid resetting scss cacher when no variables are found
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-02-27 07:30:50 +00:00
Christoph Wurst
793dbe2d22
Fix login loop if login CSRF fails and user is not logged in
If CSRF fails but the user is logged in that they probably logged in in
another tab. This is fine. We can just redirect.
If CSRF fails and the user is also not logged in then something is
fishy. E.g. because Nextcloud contantly regenrates the session and the
CSRF token and the user is stuck in an endless login loop.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-02-16 09:39:02 +01:00
Joas Schilling
f89eacbf86
fix(CI): Adjust expected result
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-02-07 07:44:16 +01:00
Joas Schilling
6761b94f4f
Remove failing test that works with mocks only anyway
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-02-03 15:16:07 +01:00
Joas Schilling
8b81770156
Skip failing avatar test with PHP 8.0
The font is placed one pixel off

Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-02-03 09:10:35 +01:00
Artur Neumann
bcfd571d83 unit tests for Manager::invalidateTokensOfUser
Signed-off-by: Artur Neumann <artur@jankaritech.com>
2022-12-20 16:26:49 +00:00
Vincent Petry
28b8d6b94f
Merge pull request #35799 from nextcloud/backport/35780/stable24
[stable24] Fix missing cast of double controller parameters
2022-12-19 12:07:23 +01:00
Christoph Wurst
7fceb57843 fix(app framework): Fix missing cast of double controller parameters
``settype`` allows 'double' as alias of 'float'.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-12-16 15:33:51 +00:00
Vincent Petry
07361adb48
Merge pull request #35657 from nextcloud/backport/35649/stable24
[stable24] Update the unencrypted file size when closing streams
2022-12-16 16:33:24 +01:00
Artur Neumann
8cf9878fd2 check if params given to API are really an array
Signed-off-by: Artur Neumann <artur@jankaritech.com>
2022-12-16 10:50:41 +00:00
Julius Härtl
d843ba9822 Also update the unencrypted size of files when creating them with empty content
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-12-07 21:15:57 +00:00
Côme Chilliet
e24df2255d
Merge pull request #35141 from nextcloud/backport/34160/stable24
[stable24] Detect weird local ips
2022-11-21 09:33:17 +01:00
Côme Chilliet
e0d588b390
Fix tests for nested v4 in v6
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-14 11:14:46 +01:00
Côme Chilliet
e5b4a097e8
Harden tests for local IP detection in URLs
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-14 11:13:55 +01:00
Joas Schilling
9aa3496913 Run integration tests on 3rdparty bump
Signed-off-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
2022-11-14 08:57:28 +00:00
Christoph Wurst
b059ea1175 Fix PublicKeyTokenProviderTest import and mock
* IDBConnection import missing
* Atomic doesn't need a mock

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-11-11 09:39:43 +00:00
Vincent Petry
1f730ec9e2
Merge pull request #34659 from nextcloud/backport/34632/stable24
[stable24] Add rate limiting on lost password emails
2022-11-04 17:30:13 +01:00
Vincent Petry
8b4fe66c14
Merge pull request #34855 from nextcloud/backport/34799/stable24
[stable24] Emit typed event when preview is requested
2022-11-04 17:20:43 +01:00
Vincent Petry
2efb811301
Merge pull request #34947 from nextcloud/backport/34804/stable24
[stable24] Skip general login with email for non-valid addresses and LDAP
2022-11-04 17:13:30 +01:00
Côme Chilliet
7dc7d0cb11
Fix LostController test
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-03 17:52:08 +01:00
Christoph Wurst
6d2677b2bb
Run session token renewals in a database transaction
The session token renewal does
1) Read the old token
2) Write a new token
3) Delete the old token

If two processes succeed to read the old token there can be two new tokens because
the queries were not run in a transaction. This is particularly problematic on
clustered DBs where 1) would go to a read node and 2) and 3) go to a write node.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-11-03 16:39:41 +01:00
Julius Härtl
91a4444c2b
Skip general login with email for non-valid addresses and LDAP
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-11-03 15:40:38 +01:00
Julius Härtl
6dc2b162c5
Emit typed event when preview is requested
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-10-27 18:51:53 +02:00
John Molakvoæ
04ec0d7f97
Merge pull request #34440 from nextcloud/backport/32635/stable24 2022-10-27 14:26:27 +02:00
Vincent Petry
1524b5fd25
Merge pull request #34797 from nextcloud/backport/33540/stable24
[stable24] fix updating cached mounts that didn't have their mount provider set previously
2022-10-27 13:36:33 +02:00
John Molakvoæ
220d71d997
Merge pull request #34410 from nextcloud/backport/33566/stable24 2022-10-27 12:29:17 +02:00
Andy Xheli
029a9ee39f Update ContactsStoreTest.php
Signed-off-by: Andy Xheli <axheli@axtsolutions.com>
2022-10-27 10:04:07 +00:00
Julius Härtl
bc3572ebc3 Check share attributes on preview endpoints
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-10-26 13:25:13 +00:00
Robin Appelman
82b915e7bb add tests for cached mount provider migration
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-10-25 10:48:30 +00:00
szaimen
e8440853b1 fix external storages access
Signed-off-by: szaimen <szaimen@e.mail.de>
2022-10-23 09:32:55 +00:00
Robin Appelman
6023dee5ae
add test for trying to fopen a file which no longer exists on disk
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-10-06 14:28:00 +02:00
blizzz
ec349fc4c1
Merge pull request #33791 from nextcloud/backport/stable24-wait-for-the-new-user-form-to-be-visible-in-acceptance-tests
[stable24] Wait for the new user form to be visible in acceptance tests
2022-09-27 08:45:48 +02:00
Carl Schwan
f072520cbd Filter out old files when trying to get recent files
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>
2022-09-08 14:43:57 +00:00
Daniel Calviño Sánchez
33b6740123 Wait for the new user form to be visible
Before it was checked if the new user form was visible, but it was not
waited for it. It seems that it can happen that the new user form is in
the DOM, and therefore found, but not visible yet when the tests run,
which caused them to (randomly) fail. Due to that now it is explicitly
waited until it is visible, rather than assuming that it is visible as
soon as it appears in the DOM.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2022-09-01 13:47:51 +02:00
Vincent Petry
cf3d92015b
Fix share attribute related tests + code style
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-08-03 13:24:19 +02:00
Vincent Petry
f1ab964819
Add share attributes + prevent download permission
Makes it possible to store download permission

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-08-03 13:24:13 +02:00
blizzz
6088f720bd
Merge pull request #33439 from nextcloud/backport/32958/stable24
[stable24] Fix file public link permissions if public upload is not enabled
2022-08-03 11:27:10 +02:00
Vincent Petry
3a3a52de83
Merge pull request #33407 from nextcloud/backport/stable24/one-time-password
[stable24] Handle one time and large passwords
2022-08-03 09:07:54 +02:00
Julien Veyssier
008a9f568d fix share manager tests
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-08-02 14:56:59 +00:00
Carl Schwan
f4795f6dac
Handle one time and large passwords
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>
2022-07-29 16:15:38 +02:00
Côme Chilliet
d0ceedf054 Use Symfony IpUtils to check for local IP ranges
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-07-26 09:42:33 +00:00
Thomas Citharel
618bbb313c Fix reading blob data as resource
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>
2022-07-25 15:59:36 +00:00
blizzz
2e9429a76f
Merge pull request #33138 from nextcloud/fix-branch-selection-in-stable24
[stable24] Fix branch selection
2022-07-07 12:08:43 +02:00