Commit Graph

802 Commits (stable20)

Author SHA1 Message Date
Joas Schilling a02ad813b2 Correctly set the response after a ClientException as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
2 years ago
Joas Schilling 50bd62bf78 Add an integration test
Signed-off-by: Joas Schilling <coding@schilljs.com>
2 years ago
dependabot[bot] fe1b589cf4
Update behat/behat requirement in /build/integration
Updates the requirements on [behat/behat](https://github.com/Behat/Behat) to permit the latest version.
- [Release notes](https://github.com/Behat/Behat/releases)
- [Changelog](https://github.com/Behat/Behat/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Behat/Behat/compare/v3.7.0...v3.10.0)

---
updated-dependencies:
- dependency-name: behat/behat
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years ago
Jonas Meurer f8719bce2f
Add integration tests for user_status API
Signed-off-by: Jonas Meurer <jonas@freesources.org>
3 years ago
Daniel Calviño Sánchez 4e05a486a3 Add integration tests for searching users in contacts menu
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
3 years ago
Daniel Calviño Sánchez 67b49edac4 Make possible to set body in requesttoken requests in integration tests
"sendingAToWithRequesttoken" needs to be used to test some non OCS
endpoints which require the request token to be sent in the request. Now
it is possible to specify the body (or, rather, additional contents
beside the cookies and the request token) for those requests, as it will
be needed for example to update the user profile.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
3 years ago
Vincent Petry 6bd49e256b
Fix empty password check for mail shares
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
3 years ago
Vincent Petry cea228ef50
Update psalm baseline
And backport error suppression from stable21 in SFTP class.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
3 years ago
Daniel Calviño Sánchez 24d853e754 Add OCC command to reset rendered texts
The command is meant to be used when the fonts used to render texts
("core/fonts/NotoSans-Regular.ttf" and "core/fonts/NotoSans-Bold.ttf")
are changed (for example, to add support for other scripts). The avatar
and text file previews will be removed, so they will be generated again
with the updated font when needed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
3 years ago
Daniel Calviño Sánchez 6997e6f755 Include additional scripts in Noto fonts
Generated avatars as well as text file previews are rendered using the
"core/fonts/NotoSans-Regular.ttf" font. The file was the standard hinted
"NotoSans-Regular.ttf" file from https://www.google.com/get/noto/.
However that file does not cover some non LGC (Latin, Greek, Cyrillic)
scripts, like Arabic, Devanagari or Hebrew, to name a few.

Markdown file previews also use "core/fonts/NotoSans-Bold.ttf", which is
in the same situation as the regular one.

Due to limitations in the TTF format it is not possible to provide a
single file for each style that includes all Noto fonts. However, it is
possible to add more scripts to the standard "NotoSans-Regular.ttf" and
"NotoSans-Bold.ttf" files (although no CJK (Chinese, Japanese, Korean)
glyph can be included due to the aforementioned limitations).

This commit replaces the standard files with an extended version created
using the Noto Tools. The build script (as well as a patch for the Noto
Tools) is also included for reference and to be able to update the font
files in the future if needed.

Due to the additional scripts added the font files are now much larger,
although this does not seem to increase the time spent rendering LGC
scripts.

Note that the file for the bold style still contains less scripts than
the regular one, as not all scripts supported by Noto have a bold
weight.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
3 years ago
Daniel Calviño Sánchez 92daa942b0 Add integration tests for "sharing:cleanup-remote-storages" OCC command
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
3 years ago
Vincent Petry 67e0b194b6
Update and fix baseline
Backported some bits of stable21 to make Psalm happy.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
3 years ago
Vincent Petry f80f7a33e8
Fix baseline further
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
3 years ago
Roeland Jago Douma 7bb7f4d936
Update psalm baseline
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
3 years ago
Roeland Jago Douma 200a3db58e Bump the ca location
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
3 years ago
Morris Jobke 8103fd98d1
Update psalm baseline to allow warning of implicit cast to string
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
3 years ago
Morris Jobke 568d46a3a5
[stable20] Update psalm-baseline.xml
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
3 years ago
Julius Härtl 05919a27b8
Update psalm baseline
Signed-off-by: Julius Härtl <jus@bitgrid.net>
3 years ago
Julius Härtl 0bbc0dde10
Update psalm baseline
Signed-off-by: Julius Härtl <jus@bitgrid.net>
3 years ago
Julius Härtl 55b9e554ec
Force composer v1
Signed-off-by: Julius Härtl <jus@bitgrid.net>
4 years ago
Robin Appelman c55197791a
cleanup after autoloader generation
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 years ago
Robin Appelman ec041c3ad5
dont use system composer for autoload checker
this ensures that the same composer version is used by everyone (and ci)

Signed-off-by: Robin Appelman <robin@icewind.nl>
4 years ago
Morris Jobke d2fd49c461 Allow subscription to indicate that a userlimit is reached
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Roeland Jago Douma 3fb850940f
Set frame-ancestors to none if none are filled
frame-ancestors doesn't fall back to default-src. So when we apply a
very restricted CSP we should make sure to set it to 'none' and not
leave it empty.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Daniel Calviño Sánchez 34a143b05f Add integration tests for creating shares with default expiration dates
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Daniel Calviño Sánchez bf844567a5 Reset app configs by deleting the values instead of setting the defaults
This avoids the need to keep the default values in the integration tests
in sync with the code, and also makes possible to reset values with
"dynamic" defaults (defaults that depend on other values).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Morris Jobke 9497dca2b0
Update psalm-baseline
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Joas Schilling d09a22069f
Update baseline, I'm sorry
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Daniel Calviño Sánchez 487c603f95 Add integration tests for default share permissions
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Morris Jobke cecf579e81
Update psalm-baseline.xml to accept new errors
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Morris Jobke f28c436fd5
Check in failing psalm checks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Morris Jobke 8c9fe98446
Update psalm-baseline
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Christoph Wurst 6536501579
Update the baseline
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst be3a46038f
Use own psalm instead of a global one
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Daniel Calviño Sánchez 0dd18e0356 Add integration tests to check that only the given path is transferred
Until recently (it was fixed in ac2999a26a) when a path was transferred
other shares with the target user were removed, so a test was added to
ensure that it does not happen again.

Besides that a test to ensure that other files with the target user are
not transferred was added too (it did not fail before, but seemed
convenient to have that covered too :-) ).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Daniel Calviño Sánchez bf9a24efbe Add integration tests for transferring files of a user with a risky name
The files:transfer-ownership performs a sanitization of users with
"risky" display names (including characters like "\" or "/").

In order to allow (escaped) double quotes in the display name the
regular expression used in the "user XXX with displayname YYY exists"
step had to be adjusted.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Daniel Calviño Sánchez 87b9dbdb56 Add integration test for transferring the path of a single file
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Morris Jobke c6948c2517
Update baseline
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Morris Jobke 04a3580d19
Remove phan config - was replaced by Psalm
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Morris Jobke 1c9a898875
Merge pull request #22761 from nextcloud/extend-integration-tests-for-files-transfer-ownership-command
Extend integration tests for "files:transfer-ownership" command
4 years ago
Morris Jobke 04c174ab89
Merge pull request #22665 from nextcloud/dependabot/composer/build/integration/behat/behat-approx-3.7.0
Update behat/behat requirement from ~3.6.1 to ~3.7.0 in /build/integration
4 years ago
Daniel Calviño Sánchez 58d57b35ea Add integration tests for transferring ownership of reshares
Currently only transferring ownership of a reshare with a group to a
user in the group is possible.

When transferring ownership of a reshare with another user or with a
group to a user not in the group restoring the share fails (but the
command succeeds, it only fails for the specific files that are
reshares).

When transferring ownership of a path that is a reshare the command
fails (as when a specific path is provided the path tries to move the
file, it does not take into account reshares).

The added integration tests reflect the above behaviours.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Daniel Calviño Sánchez 0ce8096839 Check share ownership after transferring file ownership
The integration tests did not verify that the shares were actually
transferred between the users (or that they were removed due to being
transferred to the sharee).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Daniel Calviño Sánchez d3d01d6355 Check whether file exists or not after transferring ownership
The integration tests did not verify that the files were actually
transferred between the users, only that the files were downloadable.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
4 years ago
Roeland Jago Douma c104c192ae
Merge pull request #22663 from nextcloud/dependabot/npm_and_yarn/build/karma-viewport-1.0.7
Bump karma-viewport from 1.0.6 to 1.0.7 in /build
4 years ago
Roeland Jago Douma fe5f8c5010
Merge pull request #22600 from nextcloud/dependabot/npm_and_yarn/build/http-proxy-1.18.1
[Security] Bump http-proxy from 1.17.0 to 1.18.1 in /build
4 years ago
Nextcloud-PR-Bot 9c57fff01f Update psalm baseline
Signed-off-by: GitHub <noreply@github.com>
4 years ago
dependabot[bot] 94b228dca1
Update behat/behat requirement in /build/integration
Updates the requirements on [behat/behat](https://github.com/Behat/Behat) to permit the latest version.
- [Release notes](https://github.com/Behat/Behat/releases)
- [Changelog](https://github.com/Behat/Behat/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Behat/Behat/compare/v3.6.1...v3.7.0)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
dependabot[bot] 20e6d04a69
Bump karma-viewport from 1.0.6 to 1.0.7 in /build
Bumps [karma-viewport](https://github.com/squidfunk/karma-viewport) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/squidfunk/karma-viewport/releases)
- [Changelog](https://github.com/squidfunk/karma-viewport/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/karma-viewport/compare/1.0.6...1.0.7)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
Christoph Wurst 1f7f93a695
Update license headers for Nextcloud 20 (again)
There are still lots of outdated headers, so time for another round of
updates.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago