Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3894 commits
Select commit Hold shift + click to select a range
28c1ecd
Get rid of phpstan/phpstan-strict-rules
alecpl Apr 21, 2024
db586b6
Infer file/line location in rcube::raise_error() from backtrace (#9422)
mvorisek Apr 21, 2024
c6ae485
oauth: select auth scheme (XOAUTH2 vs OAUTHBEARER) (#9289)
EdouardVanbelle Apr 21, 2024
1e0208d
Password: Use Guzzle HTTP Client in 'directadmin' driver
alecpl Apr 21, 2024
cea7706
Password: Use Guzzle HTTP Client in the plesk driver
alecpl Apr 21, 2024
7a5a10a
Password: Use Guzzle HTTP Client in the `modoboa` driver
alecpl Apr 21, 2024
d401749
Password: Use Guzzle HTTP Client in the `domainfactory` driver
alecpl Apr 21, 2024
a01bea0
Password: Use Guzzle HTTP Client in the `cpanel` driver
alecpl Apr 21, 2024
d2d7829
Doc cleanup [skip ci]
alecpl Apr 21, 2024
ee86fab
Documents redis as supported imap_cache (#9428)
svalo Apr 24, 2024
2b0a906
Fix PHP8 warning (#9429)
alecpl Apr 29, 2024
8c96185
Fix Code Spell check by disabling `String.raw` rule
pabzm May 14, 2024
e6f13fe
Merge pull request #9449 from pabzm/fix-cs-string-raw
miaulalala May 14, 2024
579c567
Fix folders hierarchy when special folders are subfolders of INBOX, w…
alecpl May 16, 2024
a5b4734
Wording improvement
alecpl May 16, 2024
1782d97
Add skin info to about dialog (#9441)
johndoh May 16, 2024
3d05b37
Update changelog
alecpl May 16, 2024
0a0f301
Cleanup raise_error() use in password drivers
alecpl May 16, 2024
78d57fa
Simplify use of rcube::raise_error()
alecpl May 17, 2024
7cf1b8e
Fix command injection via crafted im_convert_path/im_identify_path on…
alecpl May 19, 2024
d2c8042
Fix cross-site scripting (XSS) vulnerability in handling list columns…
alecpl May 19, 2024
a4e961c
Fix cross-site scripting (XSS) vulnerability in handling SVG animate …
alecpl May 19, 2024
8cd3fb8
Update changelog
alecpl May 19, 2024
3de6100
Add managesieve_host array handler (#9447)
gerbert May 19, 2024
d4b83d7
Update changelog
alecpl May 19, 2024
257f575
Update .gitignore
gerbert May 19, 2024
cb44284
Merge pull request #9455 from gerbert/wip/update-gitignore
pabzm May 21, 2024
efb178a
Fix notification focus on Chrome (#9467)
DannyDaemonic Jun 1, 2024
794e474
Update changelog
alecpl Jun 1, 2024
2ff5099
Add skin_extends JS env var containing name(s) of base skins extended…
johndoh Jun 1, 2024
78a25e7
Contacts: add more gender options (#9430)
johndoh Jun 1, 2024
fd59824
Add github issue templates (#9361)
johndoh Jun 1, 2024
45d13b8
Show quota only if sensible (#9366)
pabzm Jun 1, 2024
65c7a20
Update changelog
alecpl Jun 1, 2024
5f3dcec
Fix fatal error when parsing some TNEF attachments (#9462)
alecpl Jun 2, 2024
6096228
CS fixes
alecpl Jun 2, 2024
6561ffa
Add override method attributes (#9272)
mvorisek Jun 2, 2024
22be9d3
Add missing #[\Override] attribute
alecpl Jun 2, 2024
c775268
Fix typo
alecpl Jun 2, 2024
92797ca
Rename test files for PHPUnit 10+ (#9477)
mvorisek Jun 5, 2024
3647985
phpdoc fix
alecpl Jun 6, 2024
ff52b8a
Ignore phpstan error
alecpl Jun 7, 2024
771eaff
Fix double scrollbar in compose window with big body (#9484, #7760)
pabzm Jun 8, 2024
af10e81
Update changelog
alecpl Jun 8, 2024
4a7607d
Make dependabot check dependencies for NPM and composer (#9479)
pabzm Jun 8, 2024
0446b69
CI: Use npm install
alecpl Jun 8, 2024
85a943f
CI: Explude node_modules dir
alecpl Jun 8, 2024
22ac118
Use locally installed npm deps
alecpl Jun 8, 2024
2c3868f
CI: Use local tools in browser tests too
alecpl Jun 8, 2024
4781fc2
Dependabot versioning-strategy set to "widen"
alecpl Jun 9, 2024
29f4312
Update pear/auth_sasl requirement from ~1.1.0 to ~1.2.0 (#9490)
dependabot[bot] Jun 11, 2024
85f991f
Explicitly pin the supported versions of pear/auth_sasl (#9496)
pabzm Jun 13, 2024
4611410
Update masterminds/html5 requirement from ~2.8.0 to ~2.9.0 (#9489)
dependabot[bot] Jun 13, 2024
df9a5ec
Add PHPUnit 10.x and 11.x support (#9480)
mvorisek Jun 13, 2024
7f7058d
Add a note about 'unsafe-inline' etc. required in CSP (#9494)
pabzm Jun 15, 2024
b69eb91
Missing polish translation for "keep formatting" (#9493)
KrzysztofWWW Jun 16, 2024
c086641
Fix decoding mail parts with multiple base64-encoded text blocks (#9290)
alecpl Jun 16, 2024
121f06e
Re-introduce Ctype extension as dependency (#9509)
pabzm Jun 19, 2024
2c08b53
Bump eslint-plugin-unicorn from 53.0.0 to 54.0.0 (#9502)
dependabot[bot] Jun 19, 2024
fcea537
Added PluginAPI hooks for message_move and message_delete (#9501)
JE4GLE Jun 19, 2024
7a77705
Update bacon/bacon-qr-code requirement from ^2.0.8 to ^2.0.8 || ^3.0.…
dependabot[bot] Jun 24, 2024
47202b9
Update localizations
alecpl Jul 2, 2024
81c576f
Fix new phpstan errors
alecpl Jul 2, 2024
edc7513
Fix flaky test
alecpl Jul 7, 2024
82bf423
Fix return value of handlePartBody() when using file handle
alecpl Jul 8, 2024
9abd7df
Shortcut to authorize current domain for Mailvelope (#9500)
pabzm Jul 8, 2024
8d54533
Update changelog
alecpl Jul 8, 2024
87efd6c
Some wording changes to the issue templates (#9547)
pabzm Jul 15, 2024
ef65d3f
Update lv_LV labels (#9511)
urbels Jul 15, 2024
95fd1c9
Fix bug where some messages could get malformed in an import from a M…
alecpl Jul 17, 2024
9bedd6d
Make phpstan happy
alecpl Jul 17, 2024
4675e38
Fix invalid line break characters in multi-line text in Sieve scripts…
alecpl Jul 18, 2024
6a48069
CS fix
alecpl Jul 18, 2024
59de07d
Filter "real" attachments by being referenced (#9472)
pabzm Jul 21, 2024
77ab8f3
Fix bug where "with attachment" filter could fail on some fts engines…
alecpl Jul 21, 2024
2c1f0ee
Fix bug where an unhandled exception was caused by an invalid image a…
alecpl Jul 21, 2024
f10a7f8
Docker compose for testing (#9525)
pabzm Jul 22, 2024
c7a539f
Fix paths in .ci/compose.yml (#9552)
pabzm Jul 22, 2024
68868ee
Make pgpmime-support known after Mailvelope init (#9551)
pabzm Jul 25, 2024
7a0dcc5
Trigger warning when config files are not readable (#9550)
JohnRDOrazio Jul 27, 2024
8e0be9f
Fix bug where a long subject title could not be displayed in some cas…
alecpl Jul 27, 2024
d7cc6d0
Managesieve: Protect special scripts in managesieve_kolab_master mode
alecpl Jul 28, 2024
181f3d4
Bump docker/build-push-action from 2 to 6
dependabot[bot] Jul 29, 2024
b47e947
Bump skjnldsv/check-actor-permission from 2 to 3
dependabot[bot] Jul 29, 2024
5657194
Bump docker/login-action from 1 to 3
dependabot[bot] Jul 29, 2024
6495c30
Fix infinite loop when parsing malformed Sieve script (#9562)
alecpl Jul 31, 2024
cb25f4c
CS fix
alecpl Jul 31, 2024
9d7ce8e
Fix two new phpstan issues
alecpl Aug 2, 2024
e292565
CI: Add workaround for phpstan error
alecpl Aug 2, 2024
b98a20f
Fix bug where imap_conn_option's 'socket' was ignored (#9566)
alecpl Aug 2, 2024
d760671
Fix XSS vulnerability in post-processing of sanitized HTML content [C…
alecpl Aug 4, 2024
e9c17b1
- Fix XSS vulnerability in serving of attachments other than HTML or …
alecpl Aug 4, 2024
5ced82c
- Fix information leak (access to remote content) via insufficient CS…
alecpl Aug 4, 2024
d33f2c0
More tests
alecpl Aug 4, 2024
3187f83
CS fix
alecpl Aug 4, 2024
8d8cf48
Fix tests regression
alecpl Aug 4, 2024
fcfd463
Fix tests regression
alecpl Aug 4, 2024
7d95875
Update changelog
alecpl Aug 4, 2024
6805e09
Remove plugins.roundcube.net from composer.json (#9323)
alecpl Aug 4, 2024
6d2d546
Makefile: Remove "repositories" from composer.json
alecpl Aug 4, 2024
adecc06
Add "version" to the composer.json
alecpl Aug 4, 2024
a0444b7
Fix regression where printing/scaling/rotating image attachments was …
alecpl Aug 8, 2024
4a2d320
Remove "version" from composer.json
alecpl Aug 8, 2024
a3c7d51
CS fixes
alecpl Aug 8, 2024
6e78f7c
Fix test
alecpl Aug 8, 2024
1542b9e
CS fix
alecpl Aug 8, 2024
3cabd37
Merge pull request #9557 from roundcube/dependabot/github_actions/skj…
pabzm Aug 13, 2024
02517a3
Merge pull request #9558 from roundcube/dependabot/github_actions/doc…
pabzm Aug 13, 2024
25a1ee3
Merge pull request #9556 from roundcube/dependabot/github_actions/doc…
pabzm Aug 13, 2024
8fa7066
Makefile to build elastic's CSS (#9581)
pabzm Aug 13, 2024
88a7689
Fix regression where HTML messages were displayed unstyled (#9586)
alecpl Aug 16, 2024
fea8230
Silence the new phpstan error
alecpl Aug 21, 2024
2c3022e
Tests: Add PHP 8.4 to the matrix
alecpl Aug 21, 2024
5d1bb5f
Enable PHP 8.4 in composer.json
alecpl Aug 21, 2024
f4ad221
CI: For PHP 8.4 use 8.1 as a platform to workaround composer issues
alecpl Aug 21, 2024
a993d7e
Bump some minimum versions on devel dependencies
alecpl Aug 21, 2024
d66d9de
Bump minimum guzzlehttp/guzzle version to 7.8.2
alecpl Aug 21, 2024
01dfbbd
Bump minimum guzzlehttp/guzzle version to 7.9.2
alecpl Aug 21, 2024
a8b4274
compare both email and name before skipping vcard import
johndoh Aug 25, 2024
b6c2301
composer.json: Force guzzlehttp/promises v2.0 (#9599)
alecpl Aug 25, 2024
334a305
CI: Stop testing PHP 8.4 - we're not ready yet
alecpl Aug 27, 2024
1d62aca
OAuth: Fix some PHP warnings and improve debug logging
alecpl Aug 27, 2024
6c81edf
CI: Call bash explicitly on MS Windows. (#9609)
pabzm Aug 27, 2024
c360fe5
add MariaDB to README.md (#9595)
robertsilen Aug 27, 2024
1706b1e
Cleanup
alecpl Aug 29, 2024
11f5764
OAuth: Support standard authentication with short-living password rec…
alecpl Aug 29, 2024
310024b
Typo
alecpl Aug 30, 2024
6dcc8f3
Use new HTML5 parser available on PHP >= 8.4
alecpl Sep 1, 2024
3f319f5
Add small sanity check
alecpl Sep 2, 2024
52ed2be
Fix displaying an authorization error message (if error_description i…
alecpl Sep 4, 2024
c160520
Fix downloading files in tests with new Chromiums (#9627)
pabzm Sep 5, 2024
2773577
OAuth: Refresh token is optional (#9626)
alecpl Sep 6, 2024
ebb51dd
Fix PHP deprecation warnings (#9616)
alecpl Sep 7, 2024
d0dd6ae
Fix PHP warning (#9611)
alecpl Sep 7, 2024
064d75a
Fix driver description
alecpl Sep 7, 2024
f5b7dcd
Fix driver description again
alecpl Sep 7, 2024
2a69ab6
ldap_modify() is an alias of ldap_mod_replace()
alecpl Sep 7, 2024
2eea84c
OAuth: Add a flag to the 'authenticate' hook arguments indicating SSO…
alecpl Sep 12, 2024
ab55856
Fix new phpstan errors
alecpl Sep 12, 2024
b3a271f
Merge pull request #9606 from johndoh/vcard_import2
pabzm Sep 12, 2024
9c374ac
vcard: Fix whitespace handling in line cont's (#9637)
respiranto Sep 18, 2024
4650b84
Update changelog
alecpl Sep 18, 2024
b0b72d0
Remove year numbers in user visible places (#9603)
stefan-muc Sep 18, 2024
88dba4d
Fix test by make sorting independent of locale and case (#9640)
pabzm Sep 19, 2024
5b7958c
Managesieve: Fix default script name in the config file
alecpl Sep 25, 2024
846096f
Managesieve: Fix current script state after initial scripts creation …
alecpl Sep 25, 2024
707ee58
Fix getting IMAP vendor name (#9654)
pabzm Sep 29, 2024
3e22efd
Fix new phpstan error
alecpl Sep 29, 2024
4282660
Update changelog
alecpl Sep 29, 2024
1037ba5
Fix regression causing inline SVG images to be missing in mail previe…
alecpl Sep 29, 2024
ea8e5b3
Password: Remove reference to non-existing 'password_zxcvbn_min_score…
alecpl Oct 5, 2024
619d65d
Installer: Show NOT OK if none of the database extensions is installe…
johndoh Oct 5, 2024
9f3e641
Changelog update
alecpl Oct 5, 2024
c349560
Add image source label to dockerfiles
wuast94 Oct 8, 2024
515eb63
Update virtuser_file.php
idressos Oct 8, 2024
10a7936
Merge pull request #9667 from wuast94/patch-1
pabzm Oct 23, 2024
51b060d
Don't initialize OAuth handler in CLI
alecpl Oct 28, 2024
79c00d3
Fix tests (#9682)
alecpl Oct 28, 2024
9a96c58
Fix test
alecpl Oct 28, 2024
d0843ed
Update virtuser_file.php
idressos Oct 29, 2024
c40a413
Add comment for changed line
idressos Oct 29, 2024
a83717c
Fix PHP 8.4 deprecation warning on str_getcsv() use
alecpl Nov 3, 2024
0efe232
CS fix
alecpl Nov 3, 2024
eef8654
Managesieve: fix 12h format in sieve_formattime()
bennet0496 Nov 4, 2024
985ee41
Managesieve: fix appended 's' when seconds are in time format in siev…
bennet0496 Nov 4, 2024
3e4afae
Merge pull request #9668 from idressos/virtuser_file-email2user-fix
pabzm Nov 5, 2024
5d602c3
Changelog entry for #9668
pabzm Nov 5, 2024
c42b3ab
Introduce security@roundcube.net as security contact
pabzm Sep 17, 2024
151e9f1
Test config option rule: null -> hardcoded default, false -> disabled…
pabzm Nov 5, 2024
51b32cc
Update Changelog
bennet0496 Nov 5, 2024
0f94317
Merge pull request #9690 from roundcube/security-at-roundcube-dot-net
pabzm Nov 6, 2024
53f804f
Add 'php' log_driver, passing log entries off to php's configured
noobish Jan 15, 2018
7671a4e
Modify INSTALL docs for logging.
noobish Jan 15, 2018
f6696c2
Use the `make`-target to build CSS
pabzm Nov 6, 2024
2a1f526
Fix PHP fatal error when parsing some malformed BODYSTRUCTURE respons…
alecpl Nov 17, 2024
e1d90b9
Added German translation for "Keep Formatting" (#9701)
JE4GLE Nov 17, 2024
3bc2912
Fix preg_match()'s $flags type (#9686)
pajod Nov 19, 2024
90e0928
Keep phpstan strict rules testing (#9424)
mvorisek Nov 20, 2024
3909d08
Merge pull request #9688 from bennet0496/sieve_fix_timeformat
pabzm Nov 20, 2024
ee23af3
Setup a bot that comments on PR that is stale for 2 weeks
pabzm Nov 20, 2024
8804316
Setup a bot that notifies on manually set reminders
pabzm Nov 20, 2024
28bd9c7
Merge pull request #9709 from roundcube/reminders-bot
pabzm Nov 20, 2024
6cc9221
add invalid and error details to vcard import report
johndoh Aug 25, 2024
78252e7
small improvement to invalid vcard logging
johndoh Sep 14, 2024
b60b7b0
remove pointless variable
johndoh Sep 18, 2024
934e40f
add changelog entry
johndoh Nov 20, 2024
c84bb14
Managesieve: Parse all time and timezone formatters in sieve_formatti…
bennet0496 Nov 1, 2024
82f8b81
Update changelog for PR#9655
bennet0496 Nov 5, 2024
5457cc7
Fix PHP warning in compressMessageSet() and clarify result on an empt…
alecpl Nov 21, 2024
bf98f2c
Fix BC break intruduced in the last commit
alecpl Nov 21, 2024
0944bdb
BUG: get_variable for postgres never returns a value (#9710)
vel21ripn Nov 24, 2024
027b4ac
Update changelog
alecpl Nov 24, 2024
33fa201
Add PR to changelog.
noobish Nov 24, 2024
2242291
Limit reminder-bots to our repo
pabzm Nov 25, 2024
2747240
Bot: use permissions, not a token
pabzm Nov 25, 2024
ae23f70
Merge pull request #9714 from roundcube/reminder-bots-only-our-repo
pabzm Nov 26, 2024
af56f26
Merge pull request #6138 from noobish/php-log
pabzm Dec 2, 2024
c015545
Merge pull request #9605 from johndoh/vcard_import
pabzm Dec 2, 2024
5ee7d0e
Merge pull request #9655 from bennet0496/master
pabzm Dec 2, 2024
be172e2
Fix Oauth issues with use_secure_urls=true (#9722)
alecpl Dec 3, 2024
041f844
CS fix
alecpl Dec 3, 2024
15d7f31
A Code of Conduct
pabzm Dec 2, 2024
fde0d58
Social work guidelines for Roundcube
pabzm Dec 2, 2024
ac664e9
Remove auto-reminder bot
pabzm Dec 11, 2024
05368f4
IMAP: Partial support for ANNOTATE-EXPERIMENT-1 extension (RFC 5257)
alecpl Dec 11, 2024
a3c33f9
Add annotate_message() to the storage interface
alecpl Dec 11, 2024
0c39b9b
Reset internal cache in appropriate places to be on a safe side
alecpl Dec 12, 2024
b0eb8f4
Merge pull request #9726 from roundcube/remove-auto-reminder-bot
pabzm Dec 13, 2024
2b0f82c
Fix link style inside .tagedit-list element
alecpl Dec 18, 2024
b09ac1a
Test message rendering (#9460)
pabzm Dec 19, 2024
95fe5d3
Fix handling of binary mail parts (e.g. PDF) encoded with quoted-prin…
alecpl Jan 1, 2025
4a40373
Fix decodeContent() call with the by-reference argument
alecpl Jan 1, 2025
f6c863b
only show 'this list is empty' message after listing/searching action…
johndoh Dec 4, 2024
748bb60
wait for list to load in Browser\Contacts\ExportTest::testExportSelec…
johndoh Dec 4, 2024
dd75fc2
Changelog entry for clearing "list is empty" message
pabzm Jan 3, 2025
209df1f
Merge branch 'master' into list-loading
pabzm Jan 3, 2025
809988f
Merge pull request #9027 from johndoh/list-loading
pabzm Jan 3, 2025
8fb2205
Merge pull request #9730 from roundcube/code-of-conduct-and-social-wo…
ChristophWurst Jan 8, 2025
091d2da
Reset $cmd_num when connection is closed
alecpl Jan 8, 2025
ec6bede
Properly attach fetched headers into message parts
alecpl Jan 14, 2025
2b93d0d
Fix displaying message/rfc822 parts (#9753)
pabzm Jan 15, 2025
f7f7981
Add missing @param
alecpl Jan 16, 2025
e98bd36
Add rcube_imap_generic::getUser() method
alecpl Jan 17, 2025
0172bb5
Update links in comments and config to https where available (#9759)
johndoh Jan 26, 2025
b07794f
Update changelog
alecpl Jan 26, 2025
bedab60
Update lv_LV messages.inc fix mistake (#9744)
urbels Jan 26, 2025
1beeaee
Add `--quiet` parameter to hide updatecss.sh output (#9743)
Takika Jan 26, 2025
bf1283c
Run PHP-CS-Fixer in parallel (#9739)
melroy89 Jan 26, 2025
359a039
"Add field" widget: set `width` to `fit-content` (#9742)
ShE3py Jan 26, 2025
63e4283
Add notes about not all password strength drivers supporting score up…
alecpl Jan 26, 2025
b9384af
Send a configurable CSP in every HTML response
pabzm Sep 16, 2024
24aeec0
Ensure proper semicolons between CSP-parts.
pabzm Oct 28, 2024
18f680d
Also use default value in case of `null`
pabzm Oct 28, 2024
2421261
Add unit-tests for adding CSP header
pabzm Oct 29, 2024
511f09d
Add additional CSP header values only if present
pabzm Oct 29, 2024
4950108
Use invokeMethod instead of overriding it in a mock
pabzm Oct 30, 2024
b9b8744
Use hardcoded defaults for CSP options
pabzm Oct 30, 2024
127dec5
Test to check if hardcoded option values match defaults
pabzm Oct 30, 2024
1beafa5
Improve readability of CSP value checks
pabzm Oct 30, 2024
3e7b9f6
Fix static analysis.
pabzm Oct 30, 2024
262d75c
Fix CSP option type handling
pabzm Oct 30, 2024
f37a279
Make CSP header building more robust.
pabzm Oct 30, 2024
66ab9ae
Remove type annotation because PHP v7
pabzm Oct 30, 2024
47d36a0
Mitigate erronous complaint of phpstan
pabzm Oct 30, 2024
03b50df
Tiny corrections to make the linter happy
pabzm Oct 30, 2024
ea6b7da
Fix default CSP for remote content
pabzm Jan 28, 2025
cb15b0a
Use lax CSP whereever the HTML editor might be used
pabzm Jan 31, 2025
7c5f6a5
Use lax CSP for help plugin to allow remote frame source
pabzm Jan 31, 2025
f8a53ef
fixup! Fix default CSP for remote content
pabzm Feb 3, 2025
112bc97
Use standalone switch for CSP
pabzm Feb 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
77 changes: 77 additions & 0 deletions .ci/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
services:
mailhost:
image: docker.io/greenmail/standalone
environment:
GREENMAIL_OPTS: '-Dgreenmail.setup.test.all -Dgreenmail.hostname=0.0.0.0 -Dgreenmail.auth.disabled -Dgreenmail.preload.dir=/emails'
volumes:
- "../tests/MessageRendering/data/greenmail:/emails"
browserhost:
image: docker.io/selenium/standalone-chromium
ports:
# Allow to watch the remote controlled browser (comment out the
# `--headless` argument in TestCase::driver() before).
- '127.0.0.1:7900:7900'
volumes:
- '/dev/shm:/dev/shm'
- '../tests/Browser/downloads:/downloads'

browser_tests:
depends_on:
- mailhost
- browserhost
hostname: 'testrunner'
image: ghcr.io/roundcube/roundcubemail-testrunner:php8.3
volumes:
- '..:/app'
- '../tests/Browser/downloads:/downloads'
environment:
WEBDRIVER_CONNECT_URL: 'http://browserhost:4444'
SERVER_URL: 'http://testrunner:8000'
SERVER_BIND: '0.0.0.0:8000'
BROWSER_DOWNLOADS_DIR: '/downloads'
TESTRUNNER_DOWNLOADS_DIR: '../tests/Browser/downloads'
RC_CONFIG_IMAP_HOST: 'tls://mailhost:3143'
RC_CONFIG_SMTP_HOST: 'mailhost:3025'
command:
- .ci/run_browser_tests.sh

tests:
depends_on:
- mailhost
image: ghcr.io/roundcube/roundcubemail-testrunner:php8.3
volumes:
- '..:/app'
command:
- .ci/run_tests.sh

test_message_rendering:
depends_on:
- mailhost
image: ghcr.io/roundcube/roundcubemail-testrunner:php8.3
environment:
RC_CONFIG_IMAP_HOST: 'tls://mailhost:3143'
volumes:
- '..:/app'
command:
- .ci/run_test_message_rendering.sh

codespell:
image: ghcr.io/roundcube/roundcubemail-testrunner:php8.3
volumes:
- '..:/app'
command:
- vendor/bin/php-cs-fixer
- fix
- --dry-run
- --using-cache=no
- --diff
- --verbose

codestyle:
image: ghcr.io/roundcube/roundcubemail-testrunner:php8.3
volumes:
- '..:/app'
command:
- npx
- eslint
- .
43 changes: 43 additions & 0 deletions .ci/config-test.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

$config = [];

// Database configuration
$config['db_dsnw'] = 'sqlite:///' . sys_get_temp_dir() . '/roundcube-test-sqlite.db?mode=0646';

// Test user credentials
$config['tests_username'] = 'admin@example.net';
$config['tests_password'] = 'admin';

$config['imap_host'] = getenv('RC_CONFIG_IMAP_HOST') ?: 'localhost:143';
$config['imap_auth_type'] = 'IMAP';
$config['imap_conn_options'] = [
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
],
];
// $config['managesieve_host'] = 'localhost:4190';

// GreenMail
$config['smtp_host'] = getenv('RC_CONFIG_SMTP_HOST') ?: 'localhost:25';

// Settings required by the tests

$config['create_default_folders'] = true;
$config['skin'] = 'elastic';
$config['support_url'] = 'http://support.url';

// Plugins with tests

$config['plugins'] = [
'archive',
'attachment_reminder',
'markasjunk',
'zipdownload',
];

$config['archive_mbox'] = 'Archive';

$config['enable_spellcheck'] = true;
$config['spellcheck_engine'] = 'pspell';
53 changes: 53 additions & 0 deletions .ci/docker-images/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
ARG PHPVERSION=8.3
FROM php:${PHPVERSION}-cli
LABEL org.opencontainers.image.source="https://github.com/roundcube/roundcubemail"

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libldap2-dev \
libpng-dev \
libpq-dev \
libsqlite3-dev \
libzip-dev \
libpspell-dev \
libonig-dev \
libldap-common \
libenchant-2-dev \
nodejs \
npm \
aspell \
aspell-en \
aspell-de \
hunspell-en-us \
git \
locales \
&& apt-get clean

# Some tests require en_US.UTF-8 as locale.
RUN sed -i 's/^# en_US.UTF-8 /en_US.UTF-8 /' /etc/locale.gen && locale-gen

# TODO: Do we need the multiarch-args? What for?
#RUN debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
RUN docker-php-ext-configure gd --with-jpeg --with-freetype \
#&& docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch" \
&& docker-php-ext-configure ldap \
&& docker-php-ext-install \
zip \
pcntl \
gd \
ldap \
intl \
pspell \
enchant

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer

# Create working directory
WORKDIR /app

VOLUME /app
14 changes: 14 additions & 0 deletions .ci/docker-images/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

case "$1" in
8.1|8.3)
phpversion="$1"
;;
*)
echo "Error: first and only argument must be the wanted PHP version."
echo "Usage: $(basename $0) 8.1|8.3"
exit 1
;;
esac

exec docker build --build-arg "PHPVERSION=$phpversion" -f "$(realpath $(dirname $0)/Dockerfile)" -t "ghcr.io/pabzm/roundcubemail-testrunner:php$phpversion" "$(realpath $(dirname $0)/../../..)"
57 changes: 57 additions & 0 deletions .ci/run_browser_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash -ex

# The script is intended for use locally, as well as in the CI.
# It runs the browser-tests ("E2E" in the CI).
# It expects a running IMAP server (connection configured in
# `config-test.inc.php`, and a running Chrome/Chromium browser (connection
# hard-coded in code, overrideable via environment variables).

# Make temp and logs writeable to everyone.
chmod 777 temp logs

# Create downloads dir and ensure permissions (if it's set, the variable might
# be blank if tests are not run using containers).
if test -n "$TESTRUNNER_DOWNLOADS_DIR"; then
# Use sudo because in the Github action we apparently can't use a
# directory in $HOME or /tmp but another one for which we need
# superuser-rights.
install -m 777 -d "$TESTRUNNER_DOWNLOADS_DIR"
fi

if ! test -f config/config-test.inc.php; then
cp -v .ci/config-test.inc.php config/config-test.inc.php
fi

# Install dependencies for to remote control the browser.
composer require -n "nesbot/carbon:^2.62.1" --no-update
composer require -n "laravel/dusk:^7.9" --no-update

if $(echo $PHP_VERSION | grep -q '^8.3'); then
# Downgrade dependencies (for PHP 8.3 only)
composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction --no-progress --optimize-autoloader
else
composer update --prefer-dist --no-interaction --no-progress
fi

# Install development tools.
npm install

# Install javascript dependencies
bin/install-jsdeps.sh

# Compile Elastic's styles
make css-elastic

# Use minified javascript files
bin/jsshrink.sh

# Run tests
echo "TESTS_MODE: DESKTOP"
TESTS_MODE=desktop vendor/bin/phpunit -c tests/Browser/phpunit.xml --fail-on-warning --fail-on-risky --exclude-group=failsonga

echo "TESTS_MODE: TABLET"
TESTS_MODE=tablet vendor/bin/phpunit -c tests/Browser/phpunit.xml --fail-on-warning --fail-on-risky --exclude-group=failsonga-tablet

# Mobile mode tests are unreliable on Github Actions
# echo "TESTS_MODE: PHONE"
# TESTS_MODE=phone vendor/bin/phpunit -c tests/Browser/phpunit.xml --fail-on-warning --fail-on-risky --exclude-group=failsonga-phone
11 changes: 11 additions & 0 deletions .ci/run_test_message_rendering.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash -ex

if ! test -f config/config-test.inc.php; then
cp -v .ci/config-test.inc.php config/config-test.inc.php
fi

# Install dependencies, prefer highest.
composer update --prefer-dist --no-interaction --no-progress

# Execute tests.
vendor/bin/phpunit -c ./tests/MessageRendering/phpunit.xml --fail-on-warning --fail-on-risky
19 changes: 19 additions & 0 deletions .ci/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash -ex

if ! test -f config/config-test.inc.php; then
cp -v .ci/config-test.inc.php config/config-test.inc.php
fi

composer require "kolab/net_ldap3:~1.1.4" --no-update

# Install dependencies, prefer highest.
composer update --prefer-dist --no-interaction --no-progress

# Execute tests.
vendor/bin/phpunit -c tests/phpunit.xml --fail-on-warning --fail-on-risky

# Downgrade dependencies to the lowest versions.
composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction --no-progress --optimize-autoloader

# Execute tests again.
vendor/bin/phpunit -c tests/phpunit.xml --fail-on-warning --fail-on-risky
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

[*.{json, php, sh}]
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
Loading