Commit Graph

13161 Commits

Author SHA1 Message Date
Aleksander Machniak
89d429dbee Fix two new phpstan issues 2024-08-02 09:12:48 +02:00
Aleksander Machniak
c706575a0b CS fix 2024-07-31 18:11:51 +02:00
Aleksander Machniak
20f3988a79 Fix infinite loop when parsing malformed Sieve script (#9562) 2024-07-31 18:11:31 +02:00
Aleksander Machniak
df057fa093 Managesieve: Protect special scripts in managesieve_kolab_master mode 2024-07-28 10:58:33 +02:00
Aleksander Machniak
fdeb13727a Fix bug where a long subject title could not be displayed in some cases (#9416) 2024-07-27 09:15:57 +02:00
John R. D'Orazio
cd92b26aa8 Trigger warning when config files are not readable (#9550)
* trigger error when config files are not readable

fixes issue #9549
2024-07-27 06:49:31 +02:00
Pablo Zmdl
657f3970d8 Make pgpmime-support known after Mailvelope init (#9551)
The support for pgpmime was only checked initially after the login. If a
user e.g. authorizes a domain in Mailvelope only after a login,
Mailvelope now instantly works, instead of (silently and undocumentedly)
requireing a logout+login-cycle.
2024-07-25 08:05:13 +02:00
Pablo Zmdl
456703ad5b Fix paths in .ci/compose.yml (#9552)
A mishap from moving the file.
2024-07-22 13:12:21 +02:00
Pablo Zmdl
85094706f9 Docker compose for testing (#9525)
* More ignore-patterns in eslint config

So we don't have to specify them on the command line when we check
codestyle locally.

* Test setup for local and CI using containers

It uses standalone containers for the greenmail IMAP server and the
standalone browser.
A testrunner image is built in the CI (for `linux/amd64` only, because
Github doesn't support multi-platform building on their default
runners and we don't have our own.)

This setup helps to run the tests (reproduceably) also locally.
Previously, on my machine, they produced varying results.
It also reduces the dependencies for running the browser test.
Local execution only depends on `docker compose`, no other tools
(previously it required `sudo`, `java`, and some more.)

The previous solution should still work, if you want it.

The scripts are stored in a directory called `.ci` to hide them a little
and avoid confusion with the container images from the
`roundcubemail-docker` repo.

* Fix UI tests by waiting for element before using it

This only was a flaky problem only occurring sometimes.

* Force a new IMAP connection in plugin tests, too

In other code the initial connection is forced. Doing this here, too,
fixes occasional problems with lost imap connections.

* Make waiting for zipfile's content more robust

* CI: Run tests from script on Windows, too

* CI: Do start local chrome if no connect URL is given

* Move compose.yml to tests/

This way it's less easy mistaken as usable for running Roundcubemail in
production.

* Move compose.yml to .ci/
2024-07-22 11:44:09 +02:00
Aleksander Machniak
fbdfb036ad Fix bug where an unhandled exception was caused by an invalid image attachment (#9475)
GD functions may throw ValueError in some cases since PHP 8.0.
We wrap them in try/catch blocks.
2024-07-21 14:23:28 +02:00
Aleksander Machniak
7b68ad13c2 Fix bug where "with attachment" filter could fail on some fts engines (#9514) 2024-07-21 13:54:56 +02:00
Pablo Zmdl
8f9f1f12cd Filter "real" attachments by being referenced (#9472)
* Filter "real" attachments by being referenced

This changes the way in which attachments are determined to be shown as
such ("standalone"), or not ("inline").
In theory this should be determined by their Content-Disposition, but in
reality this often doesn't work.
Now we check if the Content-ID or Content-Location of the attachment is
actually being used in other parts of the message. If not, the
attachment is considered to be "standalone".

* Consider all mime-parts to check if message is empty

Previously only `parts` and `body` were checked, so mime-parts that were
classified into `attachments` and `inline_parts` didn't count – thus
messages that contained only those parts were shown blank.
2024-07-21 13:12:57 +02:00
Aleksander Machniak
b14a278c9f CS fix 2024-07-18 20:04:45 +02:00
Aleksander Machniak
cc72002e71 Fix invalid line break characters in multi-line text in Sieve scripts (#9543) 2024-07-18 19:46:25 +02:00
Aleksander Machniak
8653e4726a Make phpstan happy 2024-07-17 20:51:21 +02:00
Aleksander Machniak
a8218b1eeb Fix bug where some messages could get malformed in an import from a MBOX file (#9510) 2024-07-17 20:34:55 +02:00
Edža
54de62c198 Update lv_LV labels (#9511)
Updated to match current version
2024-07-15 18:22:20 +02:00
Pablo Zmdl
56f05e6792 Some wording changes to the issue templates (#9547)
* make it clearer that if you're looking for help, the forum is the
  right place.
* make all headlines full sentences
* fix a typo
2024-07-15 18:09:37 +02:00
Aleksander Machniak
6b7926c035 Update changelog
[skip ci]
2024-07-08 18:42:52 +02:00
Pablo Zmdl
3c7a28f657 Shortcut to authorize current domain for Mailvelope (#9500)
This facilitates using Mailvelope (properly, i.e. with API-access) a
lot, because people don't have to manually add their domain into
Mailvelope's options but just click a button.
2024-07-08 18:39:38 +02:00
Aleksander Machniak
23fe16d520 Fix return value of handlePartBody() when using file handle 2024-07-08 18:34:00 +02:00
Aleksander Machniak
d03154fdf0 Fix flaky test 2024-07-07 08:58:05 +02:00
Aleksander Machniak
92624b62dd Fix new phpstan errors 2024-07-02 19:47:15 +02:00
Aleksander Machniak
247b5c37d1 Update localizations 2024-07-02 19:07:54 +02:00
dependabot[bot]
571950308c Update bacon/bacon-qr-code requirement from ^2.0.8 to ^2.0.8 || ^3.0.0 (#9517)
Updates the requirements on [bacon/bacon-qr-code](https://github.com/Bacon/BaconQrCode) to permit the latest version.
- [Release notes](https://github.com/Bacon/BaconQrCode/releases)
- [Changelog](https://github.com/Bacon/BaconQrCode/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Bacon/BaconQrCode/compare/2.0.8...v3.0.0)

---
updated-dependencies:
- dependency-name: bacon/bacon-qr-code
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 09:51:11 +02:00
Jan
7a3e91a9d2 Added PluginAPI hooks for message_move and message_delete (#9501)
---------

Co-authored-by: Jan-Nicklas Adler <adler@promatur.com>
2024-06-19 18:15:07 +02:00
dependabot[bot]
2e241b1f07 Bump eslint-plugin-unicorn from 53.0.0 to 54.0.0 (#9502)
Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 53.0.0 to 54.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v53.0.0...v54.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 18:05:00 +02:00
Pablo Zmdl
599dcaaa0d Re-introduce Ctype extension as dependency (#9509)
It is required by Bacon, the QR-encoding tool.

This partially reverts commit deba22aaa9.
2024-06-19 18:04:16 +02:00
Aleksander Machniak
613629f83a Fix decoding mail parts with multiple base64-encoded text blocks (#9290) 2024-06-16 12:47:56 +02:00
KrzysztofWWW
bcaab87e1a Missing polish translation for "keep formatting" (#9493)
---------

Co-authored-by: Krzysztof Wiśniewski <krzysztof.wisniewski@solveit.pl>
2024-06-16 08:30:04 +02:00
Pablo Zmdl
12c25d02e9 Add a note about 'unsafe-inline' etc. required in CSP (#9494) 2024-06-15 12:10:16 +02:00
Michael Voříšek
6377477eb2 Add PHPUnit 10.x and 11.x support (#9480)
* Add PHPUnit 10.x and 11.x support

* fix undefined TestCase::getName() for PHPUnit 10+

* Add PHPUnit attributes but keep annotations
2024-06-13 18:40:29 +02:00
dependabot[bot]
d8b2c3b659 Update masterminds/html5 requirement from ~2.8.0 to ~2.9.0 (#9489)
Updates the requirements on [masterminds/html5](https://github.com/Masterminds/html5-php) to permit the latest version.
- [Release notes](https://github.com/Masterminds/html5-php/releases)
- [Changelog](https://github.com/Masterminds/html5-php/blob/master/RELEASE.md)
- [Commits](https://github.com/Masterminds/html5-php/compare/2.8.0...2.9.0)

---
updated-dependencies:
- dependency-name: masterminds/html5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-13 08:19:34 +02:00
Pablo Zmdl
daa5050cd3 Explicitly pin the supported versions of pear/auth_sasl (#9496)
This way we can be sure to be notified of newer versions from an
update-check.
2024-06-13 08:16:31 +02:00
dependabot[bot]
fa4cf6e116 Update pear/auth_sasl requirement from ~1.1.0 to ~1.2.0 (#9490)
* Update pear/auth_sasl requirement from ~1.1.0 to ~1.2.0

Updates the requirements on [pear/auth_sasl](https://github.com/pear/Auth_SASL) to permit the latest version.
- [Release notes](https://github.com/pear/Auth_SASL/releases)
- [Commits](https://github.com/pear/Auth_SASL/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: pear/auth_sasl
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Allow v1.2 as well as v1.1 of pear/auth_sasl

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pablo Zmdl <pablo@nextcloud.com>
2024-06-11 14:06:03 +02:00
Aleksander Machniak
4dac665065 Dependabot versioning-strategy set to "widen" 2024-06-09 09:08:37 +02:00
Aleksander Machniak
9dc9800804 CI: Use local tools in browser tests too 2024-06-08 15:00:35 +02:00
Aleksander Machniak
c9c1a8fa2b Use locally installed npm deps 2024-06-08 14:33:33 +02:00
Aleksander Machniak
d0a99e9295 CI: Explude node_modules dir 2024-06-08 14:04:37 +02:00
Aleksander Machniak
4714066354 CI: Use npm install 2024-06-08 13:56:34 +02:00
Pablo Zmdl
3d4c23e9b0 Make dependabot check dependencies for NPM and composer (#9479)
* Make dependabot check dependencies for NPM and composer

* Install JS dev requirements through package.json

This way we can have them automatically checked for newer versions.

* Add JS prod dependencies to packages.json for version tracking

They are added as optional dependencies, so we can skip their
installation with `--omit=optional` (as used in the Makefile), but we
can still have them checked for version updates automatically.

The package "publickey" is missing, because it's not available on
npmjs.com, but it hasn't seen updates in years anyway. We probably
should set up a different automatic check for updates nonetheless.

* Remove npm-related files when preparing packaging
2024-06-08 09:13:23 +02:00
Aleksander Machniak
6f604bd0fd Update changelog 2024-06-08 08:24:50 +02:00
Pablo Zmdl
f0d587bda4 Fix double scrollbar in compose window with big body (#9484, #7760)
If editing a draft, that has a lot of text content already, previously
sometimes a double scrollbar was shown, because the callback function
that calculates the height for the textare was triggered too early.

This change sets the first height calculation behind a 100ms timeout.
(A 0ms timeout might be feasible, too, just to put the callback
execution on the call stack – it also works locally, but I'm not sure
about real world behaviour, so better be safe than sorry.)
2024-06-08 08:23:39 +02:00
Aleksander Machniak
d59cfdff46 Ignore phpstan error 2024-06-07 16:07:50 +02:00
Aleksander Machniak
d8817d39b9 phpdoc fix 2024-06-06 08:01:08 +02:00
Michael Voříšek
f4272804d6 Rename test files for PHPUnit 10+ (#9477) 2024-06-05 07:46:51 +02:00
Aleksander Machniak
ed0f9b5f67 Fix typo 2024-06-02 18:45:44 +02:00
Aleksander Machniak
62ba39123c Add missing #[\Override] attribute 2024-06-02 18:42:40 +02:00
Michael Voříšek
6a5f9ee7ce Add override method attributes (#9272) 2024-06-02 15:57:56 +02:00
Aleksander Machniak
aae7267883 CS fixes 2024-06-02 15:44:15 +02:00