Commit Graph

11724 Commits

Author SHA1 Message Date
Chih-Hsuan Yen f1a9ac9b15 sanitizer: add a test to make sure <figure> is intact
Somehow with the old approach, `<figure>` is rearranged into `<head>`,
and the latter is stripped by `Sanitizer::strip_harmful_tags()` (see
[1]). The issue is fixed by [2]. Here I added a test for the regression.

[1] https://community.tt-rss.org/t/unexpected-behavior-with-figure-tag/6244
[2] 67012f9dac
2023-12-18 22:46:35 +08:00
Andrew Dolgov 67012f9dac
Revert "Fix sanitizer with libxml2 >= 2.12.0"
This reverts commit d4da4dcc32.
2023-12-17 22:42:52 +03:00
Andrew Dolgov 14ad8b21d5
bump CI jobs & utility scripts to php83 2023-12-10 09:36:09 +03:00
Andrew Dolgov 4b3cf17d8d
Merge branch 'master' of gitlab.tt-rss.org:tt-rss/tt-rss 2023-12-10 09:32:00 +03:00
Andrew Dolgov 1b31e6fd5b Merge branch 'feature/php-8.3' into 'master'
Bump to Alpine 3.19 and PHP 8.3.

See merge request tt-rss/tt-rss!14
2023-12-10 06:18:10 +00:00
wn_ 7883f024e7 Bump to Alpine 3.19 and PHP 8.3.
* https://alpinelinux.org/posts/Alpine-3.19.0-released.html
* https://www.php.net/releases/8.3/en.php
2023-12-07 12:38:23 +00:00
Andrew Dolgov 8f66f579e4
add coverage-filter 2023-12-02 18:04:55 +03:00
Andrew Dolgov 09898ccbc8
add phpunit code coverage driver 2023-12-02 18:03:06 +03:00
Andrew Dolgov 2b8e344532
add some unittest options for xmlrunner 2023-12-02 12:48:54 +03:00
Andrew Dolgov e453befab6
fix filename 2023-12-02 12:47:36 +03:00
Andrew Dolgov dbb6e7291e
enable unit test results for selenium 2023-12-02 12:44:21 +03:00
Andrew Dolgov eac9e7c103
collect phpunit artifacts 2023-12-02 11:42:12 +03:00
Andrew Dolgov 93bd96e356
add env prefixes 2023-12-02 11:38:25 +03:00
Andrew Dolgov 7005d6d5f3
add db vars 2023-12-02 11:36:09 +03:00
Andrew Dolgov 0621d22bbe
add cobertura args for phpunit-integration 2023-12-02 11:30:17 +03:00
Andrew Dolgov cc133d2c0a
disable local rules for integration tests 2023-12-02 11:16:52 +03:00
Andrew Dolgov e52eaf0e7b
add sanitizer integration test 2023-12-02 11:14:07 +03:00
Andrew Dolgov ce9847d317 Merge branch 'fix-sanitizer-new-libxml2' into 'master'
Fix sanitizer with libxml2 >= 2.12.0

See merge request tt-rss/tt-rss!12
2023-12-01 12:26:41 +00:00
Chih-Hsuan Yen d4da4dcc32 Fix sanitizer with libxml2 >= 2.12.0
Somehow with newer libxml2, `<?xml encoding="UTF-8">` no longer enforces
UTF-8. Instead, non-ASCII contents are treated as ISO-8859-1 and get
broken.

For example, `<p>中文</p>` becomes
`<p>&auml;&cedil;&shy;&aelig;&#150;&#135;</p>` (should be
`<p>&#20013;&#25991;</p>`).

Switching to another trick mentioned on [1] fixes the issue, and the
new trick still works with older libxml2 (tested 2.11.5).

As a side note, DOMDocument::loadHTML uses HTMLParser in libxml2 [2][3].

[1] https://stackoverflow.com/questions/8218230/php-domdocument-loadhtml-not-encoding-utf-8-correctly
[2] https://github.com/php/php-src/blob/php-8.1.26/ext/dom/document.c#L1855
[3] https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-HTMLparser.html
2023-11-26 21:04:56 +08:00
Andrew Dolgov 2c7e000120
set registry project 2023-11-25 20:21:10 +03:00
Andrew Dolgov 1fe1132a1a
use variable for fastcgi_pass to force resolver usage 2023-11-07 09:56:23 +03:00
Andrew Dolgov 61910acbcd
explicitly set resolver in the nginx container (configurable envvar) 2023-11-07 08:38:11 +03:00
Andrew Dolgov ff4248b09e
add wip UI/backend stuff to filter feed tree 2023-11-03 08:33:35 +03:00
Andrew Dolgov 0b7d021f8e
add wait-for-element to selenium test 2023-11-01 13:40:35 +03:00
Andrew Dolgov d4c972f551
remove .git before_scripts 2023-11-01 13:24:32 +03:00
Andrew Dolgov f48f1b0131
Revert "pass .git to docker context so self-built images would have some way to determine version without CI variables"
This reverts commit 5cfde4cada.
2023-11-01 13:24:04 +03:00
Andrew Dolgov 4ced03b4b6
forgot one job 2023-11-01 13:12:31 +03:00
Andrew Dolgov 9ce347d8d5
do the same for :publish jobs 2023-11-01 13:10:57 +03:00
Andrew Dolgov e777f2e292
fix yaml indents 2023-11-01 13:09:29 +03:00
Andrew Dolgov ee18936bfe
add .git to .dockerignore when building master images 2023-11-01 13:08:50 +03:00
Andrew Dolgov 5cfde4cada
pass .git to docker context so self-built images would have some way to determine version without CI variables 2023-11-01 13:06:40 +03:00
Andrew Dolgov 1be156408a
add some more phpunit api tests 2023-10-29 10:46:01 +03:00
Andrew Dolgov cfcab96e18
pass API_URL to phpunit-integration CLI 2023-10-29 10:01:14 +03:00
Andrew Dolgov 7cd2c5cac8
fix apitest 2023-10-29 09:42:53 +03:00
Andrew Dolgov adf3985afa
fix circular dependency 2023-10-29 09:25:01 +03:00
Andrew Dolgov afaef66783
reduce targets 2023-10-29 09:19:35 +03:00
Andrew Dolgov 8b72d9ab11
add phpunit integration (wip) 2023-10-29 09:14:18 +03:00
Andrew Dolgov 855695a862
add stuff necessary to run integration tests using phpunit 2023-10-28 18:45:09 +03:00
Andrew Dolgov 0ac8710ea1
add always-failing mock of api test 2023-10-28 18:08:42 +03:00
Andrew Dolgov 01c9869e2b
phpunit - skip integration tests 2023-10-28 18:07:54 +03:00
Andrew Dolgov d2424b9e4b
use python unittest for selenium tests 2023-10-28 11:11:13 +03:00
Andrew Dolgov a1a2fe40f6
add a separate interface for auth modules w/ change_password() method 2023-10-27 22:29:03 +03:00
Andrew Dolgov 925256c81f
unify test class naming 2023-10-27 22:10:28 +03:00
Andrew Dolgov 5a7c5b8249
Merge branch 'master' of gitlab.tt-rss.org:tt-rss/tt-rss 2023-10-27 22:07:41 +03:00
Andrew Dolgov 5920ac814c
replace some dirname horrors with a separate unit-tested method 2023-10-27 22:07:28 +03:00
Andrew Dolgov 2af5f73480 Merge branch 'bugfix/psr-4-renames' into 'master'
Fix class names in some more places.

See merge request tt-rss/tt-rss!10
2023-10-26 15:05:07 +00:00
wn_ c7e1caf223 Fix class names in some more places.
Related to the PSR-4 move via 865ecc8796
2023-10-26 15:01:43 +00:00
Andrew Dolgov 8c9c69921f
make phpstan happy 2023-10-25 18:04:42 +03:00
Andrew Dolgov 3181272619
add healthcheck public method, map by default to /healthz 2023-10-25 17:53:49 +03:00
Andrew Dolgov 865ecc8796
move to psr-4 autoloader 2023-10-25 12:55:09 +03:00