Compare commits

..

212 Commits

Author SHA1 Message Date
renovate[bot]
f3bd1a2e11 Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.6.1 2026-10-26 06:38:33 +00:00
renovate[bot]
a819283661 Update dependency org.apache.maven.plugins:maven-failsafe-plugin to v3.6.1 2026-10-26 04:33:45 +00:00
renovate[bot]
8255c1e929 Lock file maintenance 2026-10-26 00:53:26 +00:00
renovate[bot]
eb7990f8dc Update linguijs monorepo to v6.10.1 2026-10-25 16:24:22 +00:00
Jérémie Panzer
982476b2d0 Merge pull request #2343 from Athou/renovate/biomejs-biome-2.x
Update dependency @biomejs/biome to v2.6.2
2026-10-24 19:58:21 +02:00
renovate[bot]
3ec653c3b7 Update dependency @biomejs/biome to v2.6.2 2026-10-24 13:30:33 +00:00
renovate[bot]
5dc5b3795e Update dependency vite to v8.3.5 2026-10-24 08:49:46 +00:00
Jérémie Panzer
f5f77a80a3 Merge pull request #2341 from Athou/renovate/docker-login-action-4.x
Update docker/login-action action to v4.7.0
2026-10-23 20:36:02 +02:00
renovate[bot]
1d1099492e Update docker/login-action action to v4.7.0 2026-10-23 18:01:41 +00:00
Jérémie Panzer
ccc2564929 Merge pull request #2340 from Athou/renovate/com.ibm.icu-icu4j-79.x
Update dependency com.ibm.icu:icu4j to v79
2026-10-23 08:55:25 +02:00
renovate[bot]
084574ffd4 Update dependency com.ibm.icu:icu4j to v79 2026-10-22 20:43:24 +00:00
Athou
6a6978c491 release 7.4.1 2026-10-22 17:03:04 +02:00
Athou
0399375288 don't mark as read entries that the user explicitly marked as unread (#2337) 2026-10-22 09:04:57 +02:00
renovate[bot]
394346fbc1 Update dependency npm to v12.2.1 2026-10-22 01:00:28 +00:00
renovate[bot]
0feec109bd Update Node.js to v24.22.1 2026-10-21 12:22:26 +00:00
Jérémie Panzer
fdb5c9b536 Merge pull request #2339 from Athou/renovate/org.mock-server-mockserver-junit-jupiter-no-dependencies-9.x
Update dependency org.mock-server:mockserver-junit-jupiter-no-dependencies to v9.1.0
2026-10-21 14:21:44 +02:00
renovate[bot]
f7ad8aed60 Update dependency org.mock-server:mockserver-junit-jupiter-no-dependencies to v9.1.0 2026-10-21 11:48:07 +00:00
renovate[bot]
4621d7e79f Update debian:13.7 Docker digest to 4c25275 2026-10-21 05:25:57 +00:00
Jérémie Panzer
b64a49cfb0 Merge pull request #2338 from Athou/renovate/patch-mantine-monorepo
Update mantine monorepo to v9.7.3
2026-10-21 07:25:22 +02:00
renovate[bot]
aaddfbaf40 Update mantine monorepo to v9.7.3 2026-10-20 20:33:54 +00:00
Athou
994da5e1ee don't mark as read if we are still on the same entry (#2337) 2026-10-20 16:51:42 +02:00
Athou
811e282e28 mockserver already uses jackson3 2026-10-20 13:34:06 +02:00
Jérémie Panzer
892fcf8168 Merge pull request #2336 from Athou/renovate/linguijs-monorepo
Update linguijs monorepo to v6.10.0
2026-10-20 13:15:59 +02:00
renovate[bot]
032ee9243f Update linguijs monorepo to v6.10.0 2026-10-20 10:46:22 +00:00
renovate[bot]
30cdf34d56 Update quarkus.version to v3.40.1.1 2026-10-20 10:45:55 +00:00
Athou
fd52caa3fd use responseTimeout as the global timeout for the request 2026-10-20 08:47:59 +02:00
Athou
9788712808 add a global failsafe timeout to the feed fetching client 2026-10-20 08:28:15 +02:00
Jérémie Panzer
af9d086f05 Merge pull request #2335 from agross/add-oci-source-label
Add OCI source label for Renovate release-note discovery
2026-10-19 11:31:42 +02:00
Alexander Groß
fc7190868e Add OCI source label to container images 2026-10-19 10:35:18 +02:00
Athou
d3c1892c0b release 7.4.0 2026-10-19 09:07:03 +02:00
renovate[bot]
1fb4cdf3ca Lock file maintenance 2026-10-19 01:55:55 +00:00
renovate[bot]
7928183036 Update dependency vitest to v5.0.5 2026-10-18 16:41:22 +00:00
renovate[bot]
ffa276df9e Update dependency jsdom to v30.1.3 2026-10-18 13:36:44 +00:00
renovate[bot]
9f05e66e9d Update react monorepo to v19.3.1 2026-10-17 20:52:26 +00:00
renovate[bot]
8ba90ded85 Update ibm-semeru-runtimes:open-jdk-25.0.4.15-jre Docker digest to 630c738 2026-10-17 04:47:05 +00:00
renovate[bot]
4e5e2f06d3 Update dependency @testing-library/user-event to v14.6.8 2026-10-16 10:19:13 +00:00
Athou
72396254d2 Revert "prevent brotli4j from being on the classpath and extract its files in /tmp"
This reverts commit f9313006ba.
2026-10-16 12:18:09 +02:00
Athou
f9313006ba prevent brotli4j from being on the classpath and extract its files in /tmp 2026-10-16 12:05:56 +02:00
Jérémie Panzer
c894d701ff Merge pull request #2333 from Athou/renovate/react-querybuilder
Update react-querybuilder to v8.25.0
2026-10-16 06:12:26 +02:00
renovate[bot]
e9d0466018 Update react-querybuilder to v8.25.0 2026-10-16 02:45:03 +00:00
renovate[bot]
28b4f61f20 Update dependency vitest to v5.0.4 2026-10-15 11:14:46 +00:00
Athou
ab6b3b225d Revert "add support for zstd and brotli compression" because they use native libraries that need to be extracted in a temp folder which we want to avoid 2026-10-15 08:09:18 +02:00
Athou
ffb4a43e38 log what happens when we fail to compress 2026-10-15 03:07:48 +02:00
Jérémie Panzer
0653e2dc97 Merge pull request #2332 from Athou/renovate/node-24.x
Update Node.js to v24.22.0
2026-10-14 21:25:17 +02:00
renovate[bot]
912e03d2ce Update Node.js to v24.22.0 2026-10-14 19:05:35 +00:00
renovate[bot]
a8df765cda Update mantine monorepo to v9.7.2 2026-10-14 10:08:31 +00:00
Athou
b865b3ff84 add support for brotli compression 2026-10-14 07:37:31 +02:00
Athou
69c1e8a5b8 add support for zstd compression 2026-10-14 07:35:49 +02:00
Athou
c1522f1005 babel is no longer required for lingui 2026-10-14 02:49:30 +02:00
Athou
8144d24b06 Merge branch 'renovate/quarkus.version' 2026-10-14 02:46:27 +02:00
Athou
4c2e2efbb5 downgrade mockserver because 8.0.0 uses jackson 3 2026-10-14 02:46:09 +02:00
Jérémie Panzer
ad452c9a7a Merge pull request #2328 from Athou/renovate/mantine-monorepo
Update mantine monorepo to v9.7.1
2026-10-13 15:39:35 +02:00
Jérémie Panzer
a43da1304d Merge pull request #2325 from Athou/renovate/monaco-editor-0.x
Update dependency monaco-editor to v0.57.0
2026-10-13 15:39:28 +02:00
renovate[bot]
c2da59a92f Update quarkus.version to v3.40.1 2026-10-13 12:58:27 +00:00
renovate[bot]
a89166d1c4 Update mantine monorepo to v9.7.1 2026-10-13 12:58:16 +00:00
renovate[bot]
45039593bf Update dependency monaco-editor to v0.57.0 2026-10-13 12:58:02 +00:00
Athou
d56c35cdfb Merge remote-tracking branch 'origin/renovate/npm-12.x' 2026-10-13 14:56:19 +02:00
Athou
73836c6800 Merge remote-tracking branch 'origin/renovate/linguijs-monorepo' 2026-10-13 14:56:13 +02:00
Athou
f9a0440db8 Merge remote-tracking branch 'origin/renovate/graalvm-setup-graalvm-1.6.x' 2026-10-13 14:55:51 +02:00
Athou
6e7a8c1ef6 harden iframe protocols just in case 2026-10-13 13:24:42 +02:00
Athou
44147cc062 add more default headers (#2315) 2026-10-13 13:06:52 +02:00
renovate[bot]
352b756e22 Update linguijs monorepo to v6.9.1 2026-10-13 10:34:42 +00:00
renovate[bot]
a5d9eb757f Update dependency npm to v12.2.0 2026-10-13 10:34:20 +00:00
renovate[bot]
a19a73d675 Update graalvm/setup-graalvm action to v1.6.7 2026-10-13 10:34:13 +00:00
Athou
4a57f87284 Merge remote-tracking branch 'origin/renovate/patch-react-querybuilder' 2026-10-13 12:28:49 +02:00
Athou
b523fe4c58 Merge remote-tracking branch 'origin/renovate/patch-quarkus.version' 2026-10-13 12:28:44 +02:00
Athou
c208450abc Merge remote-tracking branch 'origin/renovate/patch-mantine-monorepo' 2026-10-13 12:28:39 +02:00
Athou
b73ab2a781 Merge remote-tracking branch 'origin/renovate/ibm-semeru-runtimes-25.0.x' 2026-10-13 12:28:34 +02:00
Athou
ec679cc23c Merge remote-tracking branch 'origin/renovate/patch-vitest-monorepo' 2026-10-13 12:28:22 +02:00
Athou
1dbbcc4d21 Merge remote-tracking branch 'origin/renovate/vite-8.3.x' 2026-10-13 12:28:17 +02:00
renovate[bot]
1573b61584 Update react-querybuilder to v8.24.4 2026-10-13 09:54:18 +00:00
renovate[bot]
1ac8cc7674 Update quarkus.version to v3.39.5 2026-10-13 09:54:10 +00:00
renovate[bot]
793db4e9b6 Update mantine monorepo to v9.6.3 2026-10-13 09:54:03 +00:00
renovate[bot]
12863e557a Update ibm-semeru-runtimes Docker tag to open-jdk-25.0.4.15-jre 2026-10-13 09:53:54 +00:00
renovate[bot]
d999fc1e06 Update dependency vitest to v5.0.3 2026-10-13 09:53:42 +00:00
renovate[bot]
6c288d160c Update dependency vite to v8.3.4 2026-10-13 09:53:32 +00:00
renovate[bot]
57d5dd8b20 Update dependency org.apache.httpcomponents.client5:httpclient5 to v5.6.5 2026-10-13 09:53:11 +00:00
Athou
0a8c0e0c7f don't stream the response at all if it exceeds the max size 2026-10-13 11:51:47 +02:00
Athou
f72bd4cc5c cancel requests if interrupted 2026-10-13 11:51:47 +02:00
Athou
26cce1faac we only need the response headers 2026-10-13 11:51:47 +02:00
Athou
3101b4f423 fix build 2026-10-13 11:51:47 +02:00
Jérémie Panzer
e8e30faf3e Merge pull request #2324 from Athou/renovate/maven-3.x
Update dependency maven to v3.10.0
2026-10-13 11:48:59 +02:00
Athou
3f6158fc47 add support for HTTP/2 (#2317) 2026-10-13 08:40:28 +02:00
renovate[bot]
3465645b70 Update dependency maven to v3.10.0 2026-10-13 04:41:08 +00:00
Jérémie Panzer
2dd397757d Merge pull request #2323 from Athou/renovate/com.puppycrawl.tools-checkstyle-14.x
Update dependency com.puppycrawl.tools:checkstyle to v14.3.0
2026-10-13 06:38:58 +02:00
renovate[bot]
5496419bb4 Update dependency com.puppycrawl.tools:checkstyle to v14.3.0 2026-10-13 02:18:41 +00:00
Jérémie Panzer
f1b950c38e Merge pull request #2321 from Athou/renovate/reduxjs-toolkit-2.x
Update dependency @reduxjs/toolkit to v2.13.0
2026-10-13 04:16:43 +02:00
renovate[bot]
4a3e97ad52 Update dependency @reduxjs/toolkit to v2.13.0 2026-10-12 19:20:48 +00:00
renovate[bot]
9fe17996b4 Update dependency jsdom to v30.1.2 2026-10-12 19:19:36 +00:00
Jérémie Panzer
c7a2f87148 Merge pull request #2320 from Athou/renovate/actions-setup-node-7.x
Update actions/setup-node action to v7.1.0
2026-10-12 21:18:01 +02:00
renovate[bot]
1125dd3fe7 Update actions/setup-node action to v7.1.0 2026-10-12 17:44:03 +00:00
renovate[bot]
adf48aee44 Update dependency @vitejs/plugin-react to v6.1.2 2026-10-12 15:41:38 +00:00
renovate[bot]
534d8a333e Update actions/upload-artifact action to v7.0.2 (#2319)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-12 15:41:01 +00:00
renovate[bot]
03fc91c19c Update dependency com.diffplug.spotless:spotless-maven-plugin to v3.10.4 2026-10-12 12:06:18 +00:00
renovate[bot]
d2429dada2 Update actions/download-artifact action to v8.0.2 2026-10-12 10:37:39 +00:00
renovate[bot]
0fae323647 Update debian:13.7 Docker digest to 913f670 2026-10-12 08:33:18 +00:00
renovate[bot]
fae58d56be Update dependency io.quarkiverse.playwright:quarkus-playwright to v2.3.10 2026-10-04 19:08:08 +00:00
renovate[bot]
fc56d5e7cb Update dependency @biomejs/biome to v2.5.15 2026-10-04 11:38:21 +00:00
Jérémie Panzer
04c85acae0 Merge pull request #2316 from Athou/renovate/querydsl.version
Update querydsl.version to v7.7
2026-09-25 07:52:23 +09:00
renovate[bot]
af2fd9bc09 Update querydsl.version to v7.7 2026-09-23 16:56:48 +00:00
renovate[bot]
d4ce2a213f Update dependency @babel/types to ^8.0.6 2026-09-22 00:13:21 +00:00
renovate[bot]
7d9ba805e4 Lock file maintenance 2026-09-21 01:27:17 +00:00
Jérémie Panzer
4c315ca3b8 Merge pull request #2314 from Athou/renovate/react-draggable-4.7.x
Update dependency react-draggable to v4.7.2
2026-09-20 22:56:52 +09:00
renovate[bot]
bcf812ef7a Update dependency react-draggable to v4.7.2 2026-09-20 13:21:11 +00:00
Jérémie Panzer
fd603aa76f Merge pull request #2313 from Athou/renovate/jsdom-30.x
Update dependency jsdom to v30.1.0
2026-09-20 22:20:07 +09:00
renovate[bot]
e34c08c803 Update dependency jsdom to v30.1.0 2026-09-20 04:40:09 +00:00
renovate[bot]
9252ef1531 Update dependency @biomejs/biome to v2.5.14 2026-09-19 13:24:53 +00:00
Jérémie Panzer
63153ca195 Merge pull request #2312 from Athou/renovate/debian-13.x
Update debian Docker tag to v13.7
2026-09-19 22:24:13 +09:00
Jérémie Panzer
a8c2f69251 Merge pull request #2311 from Athou/renovate/react-querybuilder
Update react-querybuilder to v8.24.0
2026-09-19 22:23:58 +09:00
Jérémie Panzer
91eaef05e1 Merge pull request #2310 from Athou/renovate/io.github.hakky54-ayza-for-apache5-10.x
Update dependency io.github.hakky54:ayza-for-apache5 to v10.1.0
2026-09-19 22:23:46 +09:00
renovate[bot]
4822642fd7 Update debian Docker tag to v13.7 2026-09-19 12:17:42 +00:00
renovate[bot]
a712d8f900 Update react-querybuilder to v8.24.0 2026-09-19 02:35:24 +00:00
renovate[bot]
86e507f93e Update dependency io.github.hakky54:ayza-for-apache5 to v10.1.0 2026-09-19 02:35:00 +00:00
renovate[bot]
86eba276c5 Update dependency vitest to v5.0.1 2026-09-19 02:34:54 +00:00
renovate[bot]
4f18a98a4a Update dependency react-router-dom to v7.18.4 2026-09-18 21:43:13 +00:00
renovate[bot]
547eff9f06 Update ibm-semeru-runtimes:open-jdk-25.0.4.10-jre Docker digest to a95258f 2026-09-18 06:56:02 +00:00
renovate[bot]
5bd1225d3f Update dependency com.google.protobuf:protobuf-java to v4.36.2 2026-09-17 23:33:37 +00:00
renovate[bot]
309a0aa94c Update quarkus.version to v3.39.4 2026-09-17 17:40:08 +00:00
renovate[bot]
f8286a6334 Update ibm-semeru-runtimes:open-jdk-25.0.4.10-jre Docker digest to 4498f13 2026-09-16 17:12:40 +00:00
renovate[bot]
916086d60e Update docker/setup-buildx-action action to v4.4.1 2026-09-16 12:28:22 +00:00
renovate[bot]
4fa0eb0a87 Update ibm-semeru-runtimes:open-jdk-25.0.4.10-jre Docker digest to 2b1e6d5 2026-09-16 11:03:21 +00:00
Athou
295eb57922 oxc-transform-react is not yet stable 2026-09-15 18:10:29 +02:00
Jérémie Panzer
2179cf57b6 Merge pull request #2308 from Athou/renovate/docker-setup-qemu-action-4.x
Update docker/setup-qemu-action action to v4.4.0
2026-09-15 18:10:20 +02:00
Jérémie Panzer
cca0f2d5db Merge pull request #2309 from Athou/renovate/org.mock-server-mockserver-junit-jupiter-8.x
Update dependency org.mock-server:mockserver-junit-jupiter to v8
2026-09-15 18:10:17 +02:00
renovate[bot]
d3c3ffb88d Update dependency org.mock-server:mockserver-junit-jupiter to v8 2026-09-15 15:41:27 +00:00
renovate[bot]
10c7196f9f Update docker/setup-qemu-action action to v4.4.0 2026-09-15 15:41:22 +00:00
Jérémie Panzer
254def6152 Merge pull request #2307 from Athou/renovate/docker-setup-buildx-action-4.x
Update docker/setup-buildx-action action to v4.4.0
2026-09-15 17:40:40 +02:00
Jérémie Panzer
09bae2565c Merge pull request #2306 from Athou/renovate/docker-build-push-action-7.x
Update docker/build-push-action action to v7.4.0
2026-09-15 17:40:37 +02:00
renovate[bot]
5572918750 Update docker/setup-buildx-action action to v4.4.0 2026-09-15 13:53:58 +00:00
renovate[bot]
4e91db09a6 Update docker/build-push-action action to v7.4.0 2026-09-15 13:53:52 +00:00
renovate[bot]
bbaee20097 Update dependency yaml to v2.9.1 2026-09-14 20:59:56 +00:00
Jérémie Panzer
7554e2b03e Merge pull request #2305 from Athou/renovate/linguijs-monorepo
Update linguijs monorepo to v6.7.0
2026-09-14 17:58:35 +02:00
renovate[bot]
3baac1138f Update linguijs monorepo to v6.7.0 2026-09-14 15:30:16 +00:00
renovate[bot]
8815cef66c Lock file maintenance 2026-09-14 04:36:54 +00:00
renovate[bot]
afa836c6df Update dependency @babel/types to ^8.0.5 2026-09-14 02:45:25 +00:00
renovate[bot]
bf513508e4 Update quarkus.version to v3.39.3 2026-09-13 19:21:03 +00:00
renovate[bot]
a0423f301d Update mantine monorepo to v9.6.1 2026-09-13 16:28:15 +00:00
renovate[bot]
302fa8f4dd Update dependency org.codehaus.mojo:properties-maven-plugin to v1.3.1 2026-09-13 15:27:55 +00:00
Jérémie Panzer
4a75a22a6c Merge pull request #2304 from Athou/renovate/vite-8.x
Update dependency vite to v8.3.0
2026-09-13 17:27:27 +02:00
renovate[bot]
c7d5cf1cc2 Update dependency vite to v8.3.0 2026-09-13 13:45:56 +00:00
renovate[bot]
e031ca3ef4 Update dependency @biomejs/biome to v2.5.13 2026-09-13 13:45:19 +00:00
renovate[bot]
8e0e926a68 Update dependency org.codehaus.mojo:exec-maven-plugin to v3.6.4 2026-09-13 09:44:51 +00:00
renovate[bot]
d4ed634c4e Update dependency @rolldown/plugin-babel to v0.2.4 2026-09-13 06:48:14 +00:00
Jérémie Panzer
18582f1a2d Merge pull request #2303 from Athou/renovate/react-monorepo
Update react monorepo to v19.3.0
2026-09-13 08:46:42 +02:00
Jérémie Panzer
3688b128e4 Merge pull request #2302 from Athou/renovate/node-24.x
Update Node.js to v24.21.0
2026-09-13 08:46:00 +02:00
renovate[bot]
4718b75f89 Update react monorepo to v19.3.0 2026-09-13 03:24:38 +00:00
renovate[bot]
aa7f8f79a5 Update Node.js to v24.21.0 2026-09-13 03:24:30 +00:00
renovate[bot]
c794a6aaf8 Update ibm-semeru-runtimes:open-jdk-25.0.4.10-jre Docker digest to c9f7958 2026-09-13 03:23:33 +00:00
renovate[bot]
0786a45995 Lock file maintenance 2026-09-07 01:08:40 +00:00
renovate[bot]
66fde65550 Update dependency @types/react-dom to v19.2.7 2026-09-06 15:08:44 +00:00
Athou
caf56aca94 speed up tests by reusing the jsdom env since we don't rely on global state 2026-09-06 16:33:14 +02:00
Jérémie Panzer
06581692e6 Merge pull request #2301 from Athou/renovate/major-vitest-monorepo
Update dependency vitest to v5
2026-09-06 16:33:06 +02:00
Athou
ca2fbd9fdd fix build 2026-09-06 16:26:04 +02:00
renovate[bot]
81ce6c9950 Update dependency vitest to v5 2026-09-06 13:27:15 +00:00
renovate[bot]
31b67f2217 Update dependency @biomejs/biome to v2.5.12 2026-09-06 09:25:21 +00:00
renovate[bot]
0ee76d39b2 Update dependency @testing-library/user-event to v14.6.7 2026-09-05 02:42:43 +00:00
renovate[bot]
6a3f4816d5 Update dependency com.diffplug.spotless:spotless-maven-plugin to v3.10.2 2026-09-04 19:13:01 +00:00
Jérémie Panzer
1365754d62 Merge pull request #2299 from Athou/renovate/org.apache.maven.plugins-maven-failsafe-plugin-3.x
Update dependency org.apache.maven.plugins:maven-failsafe-plugin to v3.6.0
2026-09-04 10:08:52 +02:00
Athou
ac4c98bead maven-failsafe-plugin 3.6.0 introduced skipITs 2026-09-04 08:21:57 +02:00
renovate[bot]
74306719ca Update dependency org.apache.maven.plugins:maven-failsafe-plugin to v3.6.0 2026-09-04 05:18:08 +00:00
Jérémie Panzer
cc028dd37f Merge pull request #2300 from Athou/renovate/org.apache.maven.plugins-maven-surefire-plugin-3.x
Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.6.0
2026-09-04 06:20:05 +02:00
Jérémie Panzer
43184fff6d Merge pull request #2298 from Athou/renovate/mantine-monorepo
Update mantine monorepo to v9.6.0
2026-09-04 06:19:59 +02:00
renovate[bot]
d41f94f254 Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.6.0 2026-09-04 01:52:42 +00:00
renovate[bot]
fb741a4e54 Update mantine monorepo to v9.6.0 2026-09-03 17:39:13 +00:00
renovate[bot]
4319dfd0fe Update quarkus.version to v3.39.2 2026-09-03 13:57:00 +00:00
Jérémie Panzer
a06a0e893c Merge pull request #2297 from Athou/renovate/org.apache.maven.plugins-maven-compiler-plugin-3.x
Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.16.0
2026-09-03 07:13:35 +02:00
renovate[bot]
8517092a88 Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.16.0 2026-09-03 02:03:10 +00:00
renovate[bot]
52e79dfaa7 Update graalvm/setup-graalvm action to v1.6.6 2026-09-02 17:42:08 +00:00
Athou
7fb19fd032 use exact version 2026-09-02 19:41:10 +02:00
Athou
6344657940 speed up client compilation by using oxc-transform-react as the react compiler 2026-09-02 19:17:03 +02:00
renovate[bot]
3f01a99b66 Update dependency org.projectlombok:lombok to v1.18.48 2026-09-02 06:05:10 +00:00
renovate[bot]
69d7350e89 Update actions/deploy-pages action to v5.0.1 2026-09-02 03:42:53 +00:00
renovate[bot]
9ee502f437 Update dependency io.github.git-commit-id:git-commit-id-maven-plugin to v10.0.1 2026-09-01 20:30:15 +00:00
Jérémie Panzer
b8b876535b Merge pull request #2295 from Athou/renovate/graalvm-setup-graalvm-1.6.x
Update graalvm/setup-graalvm action to v1.6.5
2026-09-01 22:29:25 +02:00
renovate[bot]
816edefe25 Update graalvm/setup-graalvm action to v1.6.5 2026-09-01 12:21:17 +00:00
Jérémie Panzer
c523ff608e Merge pull request #2294 from Athou/renovate/docker-setup-qemu-action-4.x
Update docker/setup-qemu-action action to v4.3.0
2026-09-01 14:20:18 +02:00
renovate[bot]
663f14c439 Update docker/setup-qemu-action action to v4.3.0 2026-09-01 11:32:29 +00:00
renovate[bot]
20c6ef6702 Update ibm-semeru-runtimes Docker tag to open-jdk-25.0.4.10-jre 2026-09-01 02:28:14 +00:00
renovate[bot]
91241f045f Update dependency com.google.protobuf:protobuf-java to v4.36.1 2026-08-31 22:47:46 +00:00
renovate[bot]
82e5c54cdc Update dependency react-router-dom to v7.18.3 2026-08-31 17:11:13 +00:00
Jérémie Panzer
4b17102e5a Merge pull request #2293 from dcelasun/chore/host-docs
Document Quarkus config for reverse proxies
2026-08-31 19:10:17 +02:00
D. Can Celasun
bc58324a56 Document Quarkus config for reverse proxies
Recent Quarkus versions started enforcing this. Let's document it so
users aren't caught unaware.
2026-08-31 17:14:45 +01:00
renovate[bot]
b43bcf244a Update dependency @vitejs/plugin-react to v6.1.1 2026-08-31 06:03:56 +00:00
renovate[bot]
befe1a0bdc Lock file maintenance 2026-08-31 03:01:31 +00:00
renovate[bot]
1aae5433f3 Update dependency @biomejs/biome to v2.5.11 2026-08-30 21:52:34 +00:00
renovate[bot]
afeb12686b Update dependency @testing-library/react to v16.3.3 2026-08-30 19:32:18 +00:00
Jérémie Panzer
75f4b94b26 Merge pull request #2290 from Athou/renovate/com.puppycrawl.tools-checkstyle-14.x
Update dependency com.puppycrawl.tools:checkstyle to v14.1.0
2026-08-30 21:31:18 +02:00
renovate[bot]
4a867904ad Update dependency com.puppycrawl.tools:checkstyle to v14.1.0 2026-08-30 17:54:42 +00:00
Jérémie Panzer
249b161243 Merge pull request #2288 from Athou/renovate/axios-1.x
Update dependency axios to v1.20.0
2026-08-29 11:35:03 +02:00
renovate[bot]
a709a3268a Update dependency axios to v1.20.0 2026-08-29 08:57:39 +00:00
renovate[bot]
50b8a06f63 Update dependency io.dropwizard.metrics:metrics-json to v4.2.40 2026-08-28 21:11:04 +00:00
renovate[bot]
29e6338b41 Update dependency com.diffplug.spotless:spotless-maven-plugin to v3.10.1 2026-08-27 21:03:55 +00:00
renovate[bot]
82e9fd7f2e Update dependency @types/react-dom to v19.2.5 2026-08-27 01:04:14 +00:00
renovate[bot]
8eb41eec53 Update dependency io.github.hakky54:ayza-for-apache5 to v10.0.7 2026-08-26 19:26:48 +00:00
Jérémie Panzer
07f96019b1 Merge pull request #2285 from Athou/renovate/node-24.x
Update Node.js to v24.20.0
2026-08-26 21:25:29 +02:00
Jérémie Panzer
1a0d4cb8cd Merge pull request #2286 from Athou/renovate/quarkus.version
Update quarkus.version to v3.39.1
2026-08-26 21:25:26 +02:00
renovate[bot]
5ae34047ee Update quarkus.version to v3.39.1 2026-08-26 18:03:22 +00:00
renovate[bot]
260181ec7c Update Node.js to v24.20.0 2026-08-26 18:03:11 +00:00
renovate[bot]
21bc826eda Update dependency org.jsoup:jsoup to v1.23.2 2026-08-26 02:52:35 +00:00
renovate[bot]
e1d9125a5c Update mantine monorepo to v9.5.2 2026-08-25 19:38:44 +00:00
renovate[bot]
8d1b836f59 Update dependency @testing-library/user-event to v14.6.6 2026-08-25 18:44:45 +00:00
renovate[bot]
bd50399483 Update dependency @biomejs/biome to v2.5.10 2026-08-25 17:00:04 +00:00
renovate[bot]
d641d25392 Update debian:13.6 Docker digest to f324c7f 2026-08-25 13:14:52 +00:00
Athou
a8c9f41fce disable the pluginTimings check because it prints false positives (fixes #2283) 2026-08-24 16:10:40 +02:00
Athou
2ff9d84584 decrease npm log level to prevent "npm notice" from logging as ERROR (fixes #2282) 2026-08-24 16:01:40 +02:00
Athou
11cd61cd44 nowrap on parent is actually enough 2026-08-24 08:21:54 +02:00
Athou
cf43988fae force the header in mobile mode if it is too large even if above the mobile breakpoint (fixed #2080) 2026-08-24 07:44:04 +02:00
renovate[bot]
4ef27e3027 Lock file maintenance 2026-08-24 01:10:53 +00:00
renovate[bot]
5ffabb387b Update dependency vite to v8.2.2 2026-08-23 06:46:05 +00:00
Jérémie Panzer
d78a45b7e5 Merge pull request #2281 from Athou/renovate/vitejs-plugin-react-6.x
Update dependency @vitejs/plugin-react to v6.1.0
2026-08-23 08:45:02 +02:00
renovate[bot]
bd5a9c382d Update dependency @vitejs/plugin-react to v6.1.0 2026-08-23 05:07:19 +00:00
renovate[bot]
e238e829ad Update react-querybuilder to v8.23.1 2026-08-22 18:52:47 +00:00
29 changed files with 1454 additions and 1126 deletions

View File

@@ -29,14 +29,14 @@ jobs:
# Setup # Setup
- name: Set up GraalVM - name: Set up GraalVM
uses: graalvm/setup-graalvm@5298d94fb55a4f185c602eeac5de1b553882abe2 # v1.6.4 uses: graalvm/setup-graalvm@27b360dbb857524eaf0b4c4cef364d38e5b4f173 # v1.6.7
with: with:
java-version: ${{ env.JAVA_VERSION }} java-version: ${{ env.JAVA_VERSION }}
distribution: "graalvm" distribution: "graalvm"
cache: "maven" cache: "maven"
- name: Set up NodeJS cache - name: Set up NodeJS cache
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with: with:
cache: "npm" cache: "npm"
cache-dependency-path: 'commafeed-client/package-lock.json' cache-dependency-path: 'commafeed-client/package-lock.json'
@@ -47,7 +47,7 @@ jobs:
# Build & Test # Build & Test
- name: Build with Maven - name: Build with Maven
run: mvn --batch-mode --no-transfer-progress install -Pnative -P${{ matrix.database }} -DskipTests=${{ matrix.os == 'windows-latest' && matrix.database != 'h2' }} run: mvn --batch-mode --no-transfer-progress install -Pnative -P${{ matrix.database }} -DskipITs=${{ matrix.os == 'windows-latest' && matrix.database != 'h2' }}
# Build pages # Build pages
- name: Create pages directory structure - name: Create pages directory structure
@@ -73,14 +73,14 @@ jobs:
# Upload artifacts # Upload artifacts
- name: Upload cross-platform app - name: Upload cross-platform app
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: matrix.os == 'ubuntu-latest' # we only need to upload the cross-platform artifact once per database if: matrix.os == 'ubuntu-latest' # we only need to upload the cross-platform artifact once per database
with: with:
name: commafeed-${{ matrix.database }}-jvm name: commafeed-${{ matrix.database }}-jvm
path: commafeed-server/target/commafeed-*.zip path: commafeed-server/target/commafeed-*.zip
- name: Upload native executable - name: Upload native executable
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with: with:
name: commafeed-${{ matrix.database }}-${{ runner.os }}-${{ runner.arch }} name: commafeed-${{ matrix.database }}-${{ runner.os }}-${{ runner.arch }}
path: commafeed-server/target/commafeed-*-runner* path: commafeed-server/target/commafeed-*-runner*
@@ -110,17 +110,17 @@ jobs:
# Setup # Setup
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0 uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
- name: Install required packages - name: Install required packages
run: sudo apt-get install -y rename unzip run: sudo apt-get install -y rename unzip
# Prepare artifacts # Prepare artifacts
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with: with:
pattern: commafeed-${{ matrix.database }}-* pattern: commafeed-${{ matrix.database }}-*
path: ./artifacts path: ./artifacts
@@ -141,7 +141,7 @@ jobs:
# Docker # Docker
- name: Login to Container Registry - name: Login to Container Registry
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
if: ${{ env.DOCKERHUB_USERNAME != '' }} if: ${{ env.DOCKERHUB_USERNAME != '' }}
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
@@ -149,7 +149,7 @@ jobs:
## build but don't push for PRs and renovate ## build but don't push for PRs and renovate
- name: Docker build - native - name: Docker build - native
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with: with:
context: . context: .
file: commafeed-server/src/main/docker/Dockerfile.native file: commafeed-server/src/main/docker/Dockerfile.native
@@ -157,7 +157,7 @@ jobs:
platforms: linux/amd64,linux/arm64/v8 platforms: linux/amd64,linux/arm64/v8
- name: Docker build - jvm - name: Docker build - jvm
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with: with:
context: . context: .
file: commafeed-server/src/main/docker/Dockerfile.jvm file: commafeed-server/src/main/docker/Dockerfile.jvm
@@ -166,7 +166,7 @@ jobs:
## build and push tag ## build and push tag
- name: Docker build and push tag - native - name: Docker build and push tag - native
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
if: ${{ github.ref_type == 'tag' }} if: ${{ github.ref_type == 'tag' }}
with: with:
context: . context: .
@@ -178,7 +178,7 @@ jobs:
athou/commafeed:${{ github.ref_name }}-${{ matrix.database }} athou/commafeed:${{ github.ref_name }}-${{ matrix.database }}
- name: Docker build and push tag - jvm - name: Docker build and push tag - jvm
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
if: ${{ github.ref_type == 'tag' }} if: ${{ github.ref_type == 'tag' }}
with: with:
context: . context: .
@@ -191,7 +191,7 @@ jobs:
## build and push master ## build and push master
- name: Docker build and push master - native - name: Docker build and push master - native
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
if: ${{ github.ref_name == 'master' }} if: ${{ github.ref_name == 'master' }}
with: with:
context: . context: .
@@ -201,7 +201,7 @@ jobs:
tags: athou/commafeed:master-${{ matrix.database }} tags: athou/commafeed:master-${{ matrix.database }}
- name: Docker build and push master - jvm - name: Docker build and push master - jvm
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
if: ${{ github.ref_name == 'master' }} if: ${{ github.ref_name == 'master' }}
with: with:
context: . context: .
@@ -226,7 +226,7 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with: with:
pattern: commafeed-* pattern: commafeed-*
path: ./artifacts path: ./artifacts
@@ -280,5 +280,5 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }} url: ${{ steps.deployment.outputs.page_url }}
steps: steps:
- uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 - uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
id: deployment id: deployment

View File

@@ -1,3 +1,3 @@
wrapperVersion=3.3.4 wrapperVersion=3.3.4
distributionType=only-script distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.16/apache-maven-3.9.16-bin.zip distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.10.0/apache-maven-3.10.0-bin.zip

View File

@@ -1,5 +1,19 @@
# Changelog # Changelog
## [7.4.1]
- Fix entries being marked as read when scrolling back to an entry that was explicitly marked as unread (#2337)
- Add a global failsafe timeout to the new HTTP/2 client to prevent it from hanging indefinitely
- Add OCI source label to container images (#2335)
## [7.4.0]
- Add support for HTTP/2 when fetching feeds (#2317)
- Send more default headers when fetching feeds, to avoid being rejected by some servers (#2315)
- Harden the content cleaning of feed entries by only allowing `http`/`https` protocols in `iframe` `src` attributes
- Fix the header in mobile mode being wrapped/cut off when too wide, even above the mobile breakpoint (#2080)
- Document how to configure Quarkus host validation when running CommaFeed behind a reverse proxy
## [7.3.2] ## [7.3.2]
- Prevent users from starring/tagging entries that are not theirs and subsequently reading them (GHSA-prfv-88mm-5gpg) - Prevent users from starring/tagging entries that are not theirs and subsequently reading them (GHSA-prfv-88mm-5gpg)

View File

@@ -167,6 +167,20 @@ CommaFeed blocks access to local resources by default to prevent [SSRF](https://
If you want to subscribe to feeds that are only available on your local network, you can disable this security measure by setting the `commafeed.http-client.block-local-addresses` variable to `false`. If you want to subscribe to feeds that are only available on your local network, you can disable this security measure by setting the `commafeed.http-client.block-local-addresses` variable to `false`.
Do this only if you trust all users of your CommaFeed instance not to access private resources. Do this only if you trust all users of your CommaFeed instance not to access private resources.
### Listen on a single network interface
By default, CommaFeed listens on all interfaces. You can restrict it by setting `quarkus.http.host`.
Note that if you set it to a local name like `127.0.0.1` host validation is enabled automatically. This prevents
access if you're using a reverse proxy like Nginx. To fix, add your actual hostname to `allowed-hosts`:
```
quarkus.http.host=127.0.0.1
quarkus.http.proxy.proxy-address-forwarding=true
quarkus.http.proxy.allow-forwarded=true
quarkus.http.host-validation.allowed-hosts=commafeed.example.com
```
## Translation ## Translation
Files for internationalization are Files for internationalization are

1
commafeed-client/.npmrc Normal file
View File

@@ -0,0 +1 @@
loglevel=warn

View File

@@ -1,5 +1,5 @@
{ {
"$schema": "https://biomejs.dev/schemas/2.5.9/schema.json", "$schema": "https://biomejs.dev/schemas/2.6.2/schema.json",
"formatter": { "formatter": {
"indentStyle": "space", "indentStyle": "space",
"indentWidth": 4, "indentWidth": 4,

File diff suppressed because it is too large Load Diff

View File

@@ -17,35 +17,35 @@
"dependencies": { "dependencies": {
"@emotion/react": "11.14.0", "@emotion/react": "11.14.0",
"@fontsource/open-sans": "5.3.0", "@fontsource/open-sans": "5.3.0",
"@lingui/core": "6.6.0", "@lingui/core": "6.10.1",
"@lingui/react": "6.6.0", "@lingui/react": "6.10.1",
"@mantine/core": "9.5.1", "@mantine/core": "9.7.3",
"@mantine/dates": "9.5.1", "@mantine/dates": "9.7.3",
"@mantine/form": "9.5.1", "@mantine/form": "9.7.3",
"@mantine/hooks": "9.5.1", "@mantine/hooks": "9.7.3",
"@mantine/modals": "9.5.1", "@mantine/modals": "9.7.3",
"@mantine/notifications": "9.5.1", "@mantine/notifications": "9.7.3",
"@mantine/spotlight": "9.5.1", "@mantine/spotlight": "9.7.3",
"@monaco-editor/react": "4.7.0", "@monaco-editor/react": "4.7.0",
"@react-querybuilder/mantine": "8.23.0", "@react-querybuilder/mantine": "8.25.0",
"@reduxjs/toolkit": "2.12.0", "@reduxjs/toolkit": "2.13.0",
"@rolldown/plugin-babel": "0.2.3", "@rolldown/plugin-babel": "0.2.4",
"axios": "1.19.0", "axios": "1.20.0",
"dayjs": "1.11.23", "dayjs": "1.11.23",
"escape-string-regexp": "5.0.0", "escape-string-regexp": "5.0.0",
"interweave": "13.1.1", "interweave": "13.1.1",
"monaco-editor": "0.56.0", "monaco-editor": "0.57.0",
"mousetrap": "1.6.5", "mousetrap": "1.6.5",
"react": "19.2.8", "react": "19.3.1",
"react-async-hook": "4.0.0", "react-async-hook": "4.0.0",
"react-contexify": "6.0.0", "react-contexify": "6.0.0",
"react-dom": "19.2.8", "react-dom": "19.3.1",
"react-draggable": "4.7.1", "react-draggable": "4.7.2",
"react-icons": "5.7.0", "react-icons": "5.7.0",
"react-infinite-scroller": "1.2.6", "react-infinite-scroller": "1.2.6",
"react-querybuilder": "8.23.0", "react-querybuilder": "8.25.0",
"react-redux": "9.3.0", "react-redux": "9.3.0",
"react-router-dom": "7.18.2", "react-router-dom": "7.18.4",
"react-swipeable": "7.0.2", "react-swipeable": "7.0.2",
"style-to-object": "2.0.2", "style-to-object": "2.0.2",
"throttle-debounce": "5.0.2", "throttle-debounce": "5.0.2",
@@ -54,32 +54,31 @@
"websocket-heartbeat-js": "1.1.3" "websocket-heartbeat-js": "1.1.3"
}, },
"devDependencies": { "devDependencies": {
"@babel/types": "^8.0.4", "@babel/types": "^8.0.6",
"@biomejs/biome": "2.5.9", "@biomejs/biome": "2.6.2",
"@lingui/babel-plugin-lingui-macro": "6.6.0", "@lingui/cli": "6.10.1",
"@lingui/cli": "6.6.0", "@lingui/vite-plugin": "6.10.1",
"@lingui/vite-plugin": "6.6.0",
"@testing-library/jest-dom": "7.0.1", "@testing-library/jest-dom": "7.0.1",
"@testing-library/react": "16.3.2", "@testing-library/react": "16.3.3",
"@testing-library/user-event": "14.6.5", "@testing-library/user-event": "14.6.8",
"@types/mousetrap": "1.6.15", "@types/mousetrap": "1.6.15",
"@types/react": "19.2.18", "@types/react": "19.3.0",
"@types/react-dom": "19.2.4", "@types/react-dom": "19.3.0",
"@types/react-infinite-scroller": "1.2.5", "@types/react-infinite-scroller": "1.2.5",
"@types/throttle-debounce": "5.0.2", "@types/throttle-debounce": "5.0.2",
"@types/tinycon": "0.6.7", "@types/tinycon": "0.6.7",
"@vitejs/plugin-react": "6.0.5", "@vitejs/plugin-react": "6.1.2",
"babel-plugin-react-compiler": "1.0.0", "babel-plugin-react-compiler": "^1.0.0",
"jsdom": "30.0.1", "jsdom": "30.1.3",
"typescript": "7.0.2", "typescript": "7.0.2",
"vite": "8.2.1", "vite": "8.3.5",
"vite-plugin-checker": "0.14.5", "vite-plugin-checker": "0.14.5",
"vitest": "4.1.11", "vitest": "5.0.5",
"yaml": "2.9.0" "yaml": "2.9.1"
}, },
"overrides": { "overrides": {
"react-infinite-scroller": { "react-infinite-scroller": {
"react": "19.2.8" "react": "19.3.1"
} }
} }
} }

View File

@@ -6,16 +6,16 @@
<parent> <parent>
<groupId>com.commafeed</groupId> <groupId>com.commafeed</groupId>
<artifactId>commafeed</artifactId> <artifactId>commafeed</artifactId>
<version>7.3.2</version> <version>7.4.1</version>
</parent> </parent>
<artifactId>commafeed-client</artifactId> <artifactId>commafeed-client</artifactId>
<name>CommaFeed Client</name> <name>CommaFeed Client</name>
<properties> <properties>
<!-- renovate: datasource=node-version depName=node --> <!-- renovate: datasource=node-version depName=node -->
<node.version>v24.19.0</node.version> <node.version>v24.22.1</node.version>
<!-- renovate: datasource=npm depName=npm --> <!-- renovate: datasource=npm depName=npm -->
<npm.version>12.0.2</npm.version> <npm.version>12.2.1</npm.version>
</properties> </properties>
<build> <build>
@@ -110,7 +110,7 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
<version>3.6.3</version> <version>3.6.4</version>
<executions> <executions>
<execution> <execution>
<id>kill-biome</id> <id>kill-biome</id>

View File

@@ -116,6 +116,30 @@ describe("entries", () => {
expect(client.entry.mark).toHaveBeenCalledWith({ id: "3", read: true }) expect(client.entry.mark).toHaveBeenCalledWith({ id: "3", read: true })
}) })
it("flags an entry marked as unread by the user until entries are reloaded", async () => {
vi.mocked(client.feed.getEntries).mockResolvedValue({
data: {
entries: [{ id: "3", read: true, markable: true } as Entry],
hasMore: false,
name: "my-feed",
errorCount: 0,
feedLink: "https://mysite.com/feed",
timestamp: 123,
ignoredReadStatus: false,
},
} as AxiosResponse<Entries>)
const store = configureStore({ reducer: reducers })
await store.dispatch(loadEntries({ source: { type: "feed", id: "feed-id" }, clearSearch: true }))
store.dispatch(markEntry({ entry: store.getState().entries.entries[0], read: false }))
expect(store.getState().entries.entries[0].keepUnread).toBe(true)
// reloading the entry list resets the flag
await store.dispatch(loadEntries({ source: { type: "feed", id: "feed-id" }, clearSearch: false }))
expect(store.getState().entries.entries[0].keepUnread).toBeUndefined()
})
it("marks all entries as read", () => { it("marks all entries as read", () => {
const store = configureStore({ const store = configureStore({
reducer: reducers, reducer: reducers,

View File

@@ -10,7 +10,11 @@ export interface EntrySource {
id: string id: string
} }
export type ExpendableEntry = Entry & { expanded?: boolean } export type ExpendableEntry = Entry & {
expanded?: boolean
/** set when the user explicitly marks the entry as unread, prevents it from being marked as read again by scrolling in expanded mode until the entry list is reloaded */
keepUnread?: boolean
}
interface EntriesState { interface EntriesState {
/** selected source */ /** selected source */
@@ -71,11 +75,13 @@ export const entriesSlice = createSlice({
builder.addCase(markEntry.pending, (state, action) => { builder.addCase(markEntry.pending, (state, action) => {
for (const e of state.entries.filter(e => e.id === action.meta.arg.entry.id)) { for (const e of state.entries.filter(e => e.id === action.meta.arg.entry.id)) {
e.read = action.meta.arg.read e.read = action.meta.arg.read
if (!action.meta.arg.read) e.keepUnread = true
} }
}) })
builder.addCase(markMultipleEntries.pending, (state, action) => { builder.addCase(markMultipleEntries.pending, (state, action) => {
for (const e of state.entries.filter(e => action.meta.arg.entries.some(e2 => e2.id === e.id))) { for (const e of state.entries.filter(e => action.meta.arg.entries.some(e2 => e2.id === e.id))) {
e.read = action.meta.arg.read e.read = action.meta.arg.read
if (!action.meta.arg.read) e.keepUnread = true
} }
}) })
builder.addCase(markAllEntries.pending, (state, action) => { builder.addCase(markAllEntries.pending, (state, action) => {

View File

@@ -5,14 +5,15 @@ import { forwardRef, type MouseEventHandler, type ReactNode } from "react"
import { Constants } from "@/app/constants" import { Constants } from "@/app/constants"
import { useActionButton } from "@/hooks/useActionButton" import { useActionButton } from "@/hooks/useActionButton"
export type Mode = "auto" | "mobile" | "desktop"
interface ActionButtonProps { interface ActionButtonProps {
icon: ReactNode icon: ReactNode
className?: string className?: string
label?: string | MessageDescriptor label?: string | MessageDescriptor
onClick?: MouseEventHandler onClick?: MouseEventHandler
variant?: ActionIconVariant & ButtonVariant variant?: ActionIconVariant & ButtonVariant
hideLabelOnDesktop?: boolean mode?: Mode
showLabelOnMobile?: boolean
} }
/** /**
@@ -25,7 +26,9 @@ export const ActionButton = forwardRef<HTMLDivElement, ActionButtonProps>((props
const label = typeof props.label === "string" ? props.label : props.label && _(props.label) const label = typeof props.label === "string" ? props.label : props.label && _(props.label)
const variant = props.variant ?? "subtle" const variant = props.variant ?? "subtle"
const iconOnly = (mobile && !props.showLabelOnMobile) || (!mobile && props.hideLabelOnDesktop)
const mode: Mode = props.mode ?? "auto"
const iconOnly = mode === "mobile" || (mode === "auto" && mobile)
return ( return (
<Box ref={ref} className="cf-action-button"> <Box ref={ref} className="cf-action-button">

View File

@@ -111,12 +111,13 @@ export function FeedEntries() {
const el = document.getElementById(Constants.dom.entryId(e)) const el = document.getElementById(Constants.dom.entryId(e))
return el && !Constants.layout.isTopVisible(el) return el && !Constants.layout.isTopVisible(el)
}) })
if (currentEntry) { if (currentEntry && currentEntry.id !== selectedEntryId) {
dispatch( dispatch(
selectEntry({ selectEntry({
entry: currentEntry, entry: currentEntry,
expand: false, expand: false,
markAsRead: !!scrollMarks, // don't mark as read entries that the user explicitly marked as unread
markAsRead: !!scrollMarks && !currentEntry.keepUnread,
scrollToEntry: false, scrollToEntry: false,
}) })
) )
@@ -124,7 +125,7 @@ export function FeedEntries() {
}) })
window.addEventListener("scroll", listener) window.addEventListener("scroll", listener)
return () => window.removeEventListener("scroll", listener) return () => window.removeEventListener("scroll", listener)
}, [dispatch, entries, viewMode, scrollMarks, scrollingToEntry]) }, [dispatch, entries, viewMode, scrollMarks, scrollingToEntry, selectedEntryId])
useMousetrap("r", async () => await dispatch(reloadEntries())) useMousetrap("r", async () => await dispatch(reloadEntries()))
useMousetrap( useMousetrap(

View File

@@ -2,7 +2,7 @@ import { msg } from "@lingui/core/macro"
import { useLingui } from "@lingui/react" import { useLingui } from "@lingui/react"
import { Box, Center, CloseButton, Divider, Group, Indicator, Popover, TextInput } from "@mantine/core" import { Box, Center, CloseButton, Divider, Group, Indicator, Popover, TextInput } from "@mantine/core"
import { useForm } from "@mantine/form" import { useForm } from "@mantine/form"
import { useEffect } from "react" import { type ReactNode, useEffect } from "react"
import { import {
TbArrowDown, TbArrowDown,
TbArrowUp, TbArrowUp,
@@ -31,7 +31,7 @@ function HeaderDivider() {
return <Divider orientation="vertical" /> return <Divider orientation="vertical" />
} }
function HeaderToolbar(props: { children: React.ReactNode }) { function HeaderToolbar(props: { children: ReactNode }) {
const { spacing } = useActionButton() const { spacing } = useActionButton()
const mobile = useMobile("480px") const mobile = useMobile("480px")
return mobile ? ( return mobile ? (
@@ -47,7 +47,7 @@ function HeaderToolbar(props: { children: React.ReactNode }) {
{props.children} {props.children}
</Box> </Box>
) : ( ) : (
<Group gap={spacing} className="cf-toolbar"> <Group gap={spacing} wrap="nowrap" className="cf-toolbar">
{props.children} {props.children}
</Group> </Group>
) )

View File

@@ -42,7 +42,7 @@ export function WelcomePage() {
icon={<TbClock size={iconSize} />} icon={<TbClock size={iconSize} />}
variant="outline" variant="outline"
onClick={async () => await login.execute({ name: "demo", password: "demo" })} onClick={async () => await login.execute({ name: "demo", password: "demo" })}
showLabelOnMobile mode="desktop"
/> />
</Center> </Center>
)} )}
@@ -100,7 +100,7 @@ function Buttons() {
icon={<TbKey size={iconSize} />} icon={<TbKey size={iconSize} />}
variant="outline" variant="outline"
onClick={async () => await dispatch(redirectToLogin())} onClick={async () => await dispatch(redirectToLogin())}
showLabelOnMobile mode="desktop"
/> />
{serverInfos?.allowRegistrations && ( {serverInfos?.allowRegistrations && (
<ActionButton <ActionButton
@@ -108,7 +108,7 @@ function Buttons() {
icon={<TbUserPlus size={iconSize} />} icon={<TbUserPlus size={iconSize} />}
variant="filled" variant="filled"
onClick={async () => await dispatch(redirectToRegistration())} onClick={async () => await dispatch(redirectToRegistration())}
showLabelOnMobile mode="desktop"
/> />
)} )}
@@ -116,7 +116,7 @@ function Buttons() {
label={dark ? msg`Switch to light theme` : msg`Switch to dark theme`} label={dark ? msg`Switch to light theme` : msg`Switch to dark theme`}
icon={colorScheme === "dark" ? <TbSun size={18} /> : <TbMoon size={iconSize} />} icon={colorScheme === "dark" ? <TbSun size={18} /> : <TbMoon size={iconSize} />}
onClick={() => toggleColorScheme()} onClick={() => toggleColorScheme()}
hideLabelOnDesktop mode="mobile"
/> />
{isBrowserExtensionPopup && ( {isBrowserExtensionPopup && (
@@ -124,7 +124,7 @@ function Buttons() {
label={msg`Extension options`} label={msg`Extension options`}
icon={<TbSettings size={iconSize} />} icon={<TbSettings size={iconSize} />}
onClick={() => openSettingsPage()} onClick={() => openSettingsPage()}
hideLabelOnDesktop mode="mobile"
/> />
)} )}
</Group> </Group>

View File

@@ -227,7 +227,7 @@ export default function Layout(props: Readonly<LayoutProps>) {
)} )}
</OnMobile> </OnMobile>
<OnDesktop> <OnDesktop>
<Group p="md"> <Group p="md" wrap="nowrap">
<Group justify="space-between" style={{ width: sidebarWidth - 16 }}> <Group justify="space-between" style={{ width: sidebarWidth - 16 }}>
<Box> <Box>
<LogoAndTitle /> <LogoAndTitle />

View File

@@ -1,4 +1,4 @@
import "@testing-library/jest-dom" import "@testing-library/jest-dom/vitest"
import { vi } from "vitest" import { vi } from "vitest"
import { Constants } from "@/app/constants" import { Constants } from "@/app/constants"

View File

@@ -7,11 +7,8 @@ import checker from "vite-plugin-checker"
export default defineConfig(() => ({ export default defineConfig(() => ({
plugins: [ plugins: [
react(), react(),
babel({ lingui({ macroTransform: true }),
presets: [reactCompilerPreset()], babel({ presets: [reactCompilerPreset()] }),
plugins: ["@lingui/babel-plugin-lingui-macro"],
}),
lingui(),
checker({ checker({
// temporary disabled until TypeScript 7 exposes a stable api // temporary disabled until TypeScript 7 exposes a stable api
// typescript: true, // typescript: true,
@@ -44,6 +41,7 @@ export default defineConfig(() => ({
inconsistentCjsInterop: true, inconsistentCjsInterop: true,
}, },
test: { test: {
isolate: false,
environment: "jsdom", environment: "jsdom",
globals: true, globals: true,
setupFiles: "./src/setupTests.ts", setupFiles: "./src/setupTests.ts",
@@ -51,6 +49,9 @@ export default defineConfig(() => ({
build: { build: {
chunkSizeWarningLimit: 4000, chunkSizeWarningLimit: 4000,
rolldownOptions: { rolldownOptions: {
checks: {
pluginTimings: false,
},
output: { output: {
codeSplitting: { codeSplitting: {
groups: [ groups: [

View File

@@ -6,15 +6,15 @@
<parent> <parent>
<groupId>com.commafeed</groupId> <groupId>com.commafeed</groupId>
<artifactId>commafeed</artifactId> <artifactId>commafeed</artifactId>
<version>7.3.2</version> <version>7.4.1</version>
</parent> </parent>
<artifactId>commafeed-server</artifactId> <artifactId>commafeed-server</artifactId>
<name>CommaFeed Server</name> <name>CommaFeed Server</name>
<packaging>quarkus</packaging> <packaging>quarkus</packaging>
<properties> <properties>
<quarkus.version>3.38.3</quarkus.version> <quarkus.version>3.40.1.1</quarkus.version>
<querydsl.version>7.6</querydsl.version> <querydsl.version>7.7</querydsl.version>
<rome.version>2.1.0</rome.version> <rome.version>2.1.0</rome.version>
<!-- renovate: depName=com.google.googlejavaformat:google-java-format --> <!-- renovate: depName=com.google.googlejavaformat:google-java-format -->
<google-java-format.version>1.36.1</google-java-format.version> <google-java-format.version>1.36.1</google-java-format.version>
@@ -35,7 +35,7 @@
<dependency> <dependency>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId> <artifactId>protobuf-java</artifactId>
<version>4.36.0</version> <version>4.36.2</version>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
@@ -64,7 +64,7 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId> <artifactId>properties-maven-plugin</artifactId>
<version>1.3.0</version> <version>1.3.1</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>
@@ -116,7 +116,7 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
<version>3.6.3</version> <version>3.6.4</version>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>io.quarkus</groupId> <groupId>io.quarkus</groupId>
@@ -164,7 +164,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>3.5.6</version> <version>3.6.1</version>
<configuration> <configuration>
<argLine>@{argLine}</argLine> <argLine>@{argLine}</argLine>
<systemPropertyVariables> <systemPropertyVariables>
@@ -176,7 +176,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId> <artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.6</version> <version>3.6.1</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>
@@ -221,7 +221,7 @@
<plugin> <plugin>
<groupId>io.github.git-commit-id</groupId> <groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId> <artifactId>git-commit-id-maven-plugin</artifactId>
<version>10.0.0</version> <version>10.0.1</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>
@@ -245,7 +245,7 @@
<dependency> <dependency>
<groupId>com.puppycrawl.tools</groupId> <groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId> <artifactId>checkstyle</artifactId>
<version>14.0.0</version> <version>14.3.0</version>
</dependency> </dependency>
</dependencies> </dependencies>
<executions> <executions>
@@ -274,7 +274,7 @@
<plugin> <plugin>
<groupId>com.diffplug.spotless</groupId> <groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId> <artifactId>spotless-maven-plugin</artifactId>
<version>3.10.0</version> <version>3.10.4</version>
<?m2e ignore?> <?m2e ignore?>
<executions> <executions>
<execution> <execution>
@@ -302,14 +302,14 @@
<dependency> <dependency>
<groupId>com.commafeed</groupId> <groupId>com.commafeed</groupId>
<artifactId>commafeed-client</artifactId> <artifactId>commafeed-client</artifactId>
<version>7.3.2</version> <version>7.4.1</version>
</dependency> </dependency>
<!-- compile-time processors --> <!-- compile-time processors -->
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>1.18.46</version> <version>1.18.48</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.kohsuke.metainf-services</groupId> <groupId>org.kohsuke.metainf-services</groupId>
@@ -322,6 +322,11 @@
<artifactId>quarkus-extension-processor</artifactId> <artifactId>quarkus-extension-processor</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>nativeimage</artifactId>
<scope>provided</scope>
</dependency>
<!-- quarkus dependencies --> <!-- quarkus dependencies -->
<dependency> <dependency>
@@ -368,7 +373,7 @@
<dependency> <dependency>
<groupId>io.dropwizard.metrics</groupId> <groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-json</artifactId> <artifactId>metrics-json</artifactId>
<version>4.2.39</version> <version>4.2.40</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.github.openfeign.querydsl</groupId> <groupId>io.github.openfeign.querydsl</groupId>
@@ -429,12 +434,12 @@
<dependency> <dependency>
<groupId>org.jsoup</groupId> <groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId> <artifactId>jsoup</artifactId>
<version>1.23.1</version> <version>1.23.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.ibm.icu</groupId> <groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId> <artifactId>icu4j</artifactId>
<version>78.3</version> <version>79.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sourceforge.cssparser</groupId> <groupId>net.sourceforge.cssparser</groupId>
@@ -449,17 +454,12 @@
<dependency> <dependency>
<groupId>org.apache.httpcomponents.client5</groupId> <groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId> <artifactId>httpclient5</artifactId>
<version>5.6.4</version> <version>5.6.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.github.hakky54</groupId> <groupId>io.github.hakky54</groupId>
<artifactId>ayza-for-apache5</artifactId> <artifactId>ayza-for-apache5</artifactId>
<version>10.0.6</version> <version>10.1.0</version>
</dependency>
<dependency>
<groupId>org.brotli</groupId>
<artifactId>dec</artifactId>
<version>0.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.seancfoley</groupId> <groupId>com.github.seancfoley</groupId>
@@ -476,13 +476,13 @@
<dependency> <dependency>
<groupId>io.quarkiverse.playwright</groupId> <groupId>io.quarkiverse.playwright</groupId>
<artifactId>quarkus-playwright</artifactId> <artifactId>quarkus-playwright</artifactId>
<version>2.3.8</version> <version>2.3.10</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mock-server</groupId> <groupId>org.mock-server</groupId>
<artifactId>mockserver-junit-jupiter</artifactId> <artifactId>mockserver-junit-jupiter-no-dependencies</artifactId>
<version>7.6.0</version> <version>9.1.0</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>

View File

@@ -1,4 +1,6 @@
FROM ibm-semeru-runtimes:open-jdk-25.0.4.0-jre@sha256:524f0d04723aff42ed4142ab2621fa55f22cb691763cd75b59eee86749e2e872 FROM ibm-semeru-runtimes:open-jdk-25.0.4.15-jre@sha256:630c738228597b4cd31d9823e479384729b03684bac23478b33fdbda13ae31b8
LABEL org.opencontainers.image.source="https://github.com/Athou/commafeed"
EXPOSE 8082 EXPOSE 8082
RUN mkdir -p /commafeed/data RUN mkdir -p /commafeed/data

View File

@@ -1,4 +1,6 @@
FROM debian:13.6@sha256:34cd9e9fd437c0a095ec39cb2e73422c9f30821b0d0848ed74fd0d43bae4d958 FROM debian:13.7@sha256:4c25275446ca371766b8b093c696782eabce06263fccacb8d5d813b3dc44b308
LABEL org.opencontainers.image.source="https://github.com/Athou/commafeed"
ARG TARGETARCH ARG TARGETARCH
EXPOSE 8082 EXPOSE 8082

View File

@@ -6,6 +6,8 @@ import com.codahale.metrics.Histogram;
import com.codahale.metrics.Meter; import com.codahale.metrics.Meter;
import com.codahale.metrics.MetricRegistry; import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Timer; import com.codahale.metrics.Timer;
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
import io.quarkus.runtime.annotations.RegisterForReflection; import io.quarkus.runtime.annotations.RegisterForReflection;
@@ -346,4 +348,22 @@ import io.quarkus.runtime.annotations.RegisterForReflection;
com.rometools.opml.feed.synd.impl.ConverterForOPML10.class, com.rometools.opml.feed.synd.impl.ConverterForOPML10.class,
com.rometools.opml.feed.synd.impl.ConverterForOPML20.class, com.rometools.opml.feed.synd.impl.ConverterForOPML20.class,
}) })
public class NativeImageClasses {} public class NativeImageClasses {
// disable zstd and brotli runtime detection because it causes native image failure
@TargetClass(className = "org.apache.hc.client5.http.impl.ZstdRuntime")
static final class ZstdRuntime {
@Substitute
public static boolean available() {
return false;
}
}
@TargetClass(className = "org.apache.hc.client5.http.impl.Brotli4jRuntime")
static final class Brotli4jRuntime {
@Substitute
public static boolean available() {
return false;
}
}
}

View File

@@ -19,27 +19,27 @@ import nl.altindag.ssl.apache5.util.Apache5SslUtils;
import org.apache.hc.client5.http.DnsResolver; import org.apache.hc.client5.http.DnsResolver;
import org.apache.hc.client5.http.SystemDefaultDnsResolver; import org.apache.hc.client5.http.SystemDefaultDnsResolver;
import org.apache.hc.client5.http.async.methods.InflatingAsyncDataConsumer;
import org.apache.hc.client5.http.async.methods.InflatingGzipDataConsumer;
import org.apache.hc.client5.http.config.ConnectionConfig; import org.apache.hc.client5.http.config.ConnectionConfig;
import org.apache.hc.client5.http.config.TlsConfig; import org.apache.hc.client5.http.config.TlsConfig;
import org.apache.hc.client5.http.entity.DeflateInputStream;
import org.apache.hc.client5.http.entity.InputStreamFactory;
import org.apache.hc.client5.http.entity.compress.ContentCoding; import org.apache.hc.client5.http.entity.compress.ContentCoding;
import org.apache.hc.client5.http.impl.DefaultRedirectStrategy; import org.apache.hc.client5.http.impl.DefaultRedirectStrategy;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; import org.apache.hc.client5.http.impl.async.HttpAsyncClients;
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager; import org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManager;
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder; import org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder;
import org.apache.hc.client5.http.io.HttpClientConnectionManager;
import org.apache.hc.client5.http.protocol.RedirectStrategy; import org.apache.hc.client5.http.protocol.RedirectStrategy;
import org.apache.hc.core5.http.Header; import org.apache.hc.core5.http.Header;
import org.apache.hc.core5.http.HttpException; import org.apache.hc.core5.http.HttpException;
import org.apache.hc.core5.http.HttpRequest; import org.apache.hc.core5.http.HttpRequest;
import org.apache.hc.core5.http.HttpResponse; import org.apache.hc.core5.http.HttpResponse;
import org.apache.hc.core5.http.message.BasicHeader; import org.apache.hc.core5.http.message.BasicHeader;
import org.apache.hc.core5.http.nio.AsyncDataConsumer;
import org.apache.hc.core5.http.protocol.HttpContext; import org.apache.hc.core5.http.protocol.HttpContext;
import org.apache.hc.core5.http2.HttpVersionPolicy;
import org.apache.hc.core5.util.TimeValue; import org.apache.hc.core5.util.TimeValue;
import org.apache.hc.core5.util.Timeout; import org.apache.hc.core5.util.Timeout;
import org.brotli.dec.BrotliInputStream;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.URI; import java.net.URI;
@@ -48,7 +48,7 @@ import java.util.ArrayList;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.SequencedMap; import java.util.SequencedMap;
import java.util.zip.GZIPInputStream; import java.util.function.UnaryOperator;
@Singleton @Singleton
@RequiredArgsConstructor @RequiredArgsConstructor
@@ -60,8 +60,8 @@ public class HttpClientFactory {
private final CommaFeedConfiguration config; private final CommaFeedConfiguration config;
private final CommaFeedVersion version; private final CommaFeedVersion version;
public CloseableHttpClient newClient(int poolSize) { public CloseableHttpAsyncClient newClient(int poolSize) {
PoolingHttpClientConnectionManager connectionManager = PoolingAsyncClientConnectionManager connectionManager =
newConnectionManager(config, poolSize); newConnectionManager(config, poolSize);
String userAgent = String userAgent =
config.httpClient() config.httpClient()
@@ -74,42 +74,48 @@ public class HttpClientFactory {
return newClient(config, connectionManager, userAgent); return newClient(config, connectionManager, userAgent);
} }
private CloseableHttpClient newClient( private CloseableHttpAsyncClient newClient(
CommaFeedConfiguration config, CommaFeedConfiguration config,
HttpClientConnectionManager connectionManager, PoolingAsyncClientConnectionManager connectionManager,
String userAgent) { String userAgent) {
List<Header> headers = new ArrayList<>(); List<Header> headers = new ArrayList<>();
headers.add(new BasicHeader(HttpHeaders.ACCEPT_LANGUAGE, "en")); headers.add(new BasicHeader(HttpHeaders.ACCEPT_LANGUAGE, "en"));
headers.add(new BasicHeader(HttpHeaders.PRAGMA, "No-cache")); headers.add(new BasicHeader(HttpHeaders.PRAGMA, "No-cache"));
headers.add(new BasicHeader(HttpHeaders.CACHE_CONTROL, "no-cache")); headers.add(new BasicHeader(HttpHeaders.CACHE_CONTROL, "no-cache"));
headers.add(new BasicHeader(HttpHeaders.ACCEPT, "*/*"));
headers.add(new BasicHeader(HttpHeaders.SEC_FETCH_MODE, "navigate"));
SequencedMap<String, InputStreamFactory> contentDecoderMap = new LinkedHashMap<>(); SequencedMap<String, UnaryOperator<AsyncDataConsumer>> contentDecoderMap =
contentDecoderMap.put(ContentCoding.GZIP.token(), GZIPInputStream::new); new LinkedHashMap<>();
contentDecoderMap.put(ContentCoding.DEFLATE.token(), DeflateInputStream::new); contentDecoderMap.put(
contentDecoderMap.put(ContentCoding.BROTLI.token(), BrotliInputStream::new); ContentCoding.DEFLATE.token(), d -> new InflatingAsyncDataConsumer(d, null));
contentDecoderMap.put(ContentCoding.GZIP.token(), InflatingGzipDataConsumer::new);
RedirectStrategy redirectStrategy = RedirectStrategy redirectStrategy =
config.httpClient().blockLocalAddresses() config.httpClient().blockLocalAddresses()
? new BlockLocalAddressesRedirectStrategy(DNS_RESOLVER) ? new BlockLocalAddressesRedirectStrategy(DNS_RESOLVER)
: new DefaultRedirectStrategy(); : new DefaultRedirectStrategy();
return HttpClientBuilder.create() CloseableHttpAsyncClient client =
.disableConnectionState() HttpAsyncClients.custom()
.useSystemProperties() .disableConnectionState()
.disableAutomaticRetries() .useSystemProperties()
.disableCookieManagement() .disableAutomaticRetries()
.setUserAgent(userAgent) .disableCookieManagement()
.setDefaultHeaders(headers) .setUserAgent(userAgent)
.setConnectionManager(connectionManager) .setDefaultHeaders(headers)
.evictExpiredConnections() .setConnectionManager(connectionManager)
.evictIdleConnections( .evictExpiredConnections()
TimeValue.of(config.httpClient().idleConnectionsEvictionInterval())) .evictIdleConnections(
.setContentDecoderRegistry(new LinkedHashMap<>(contentDecoderMap)) TimeValue.of(config.httpClient().idleConnectionsEvictionInterval()))
.setRedirectStrategy(redirectStrategy) .setContentDecoderMap(new LinkedHashMap<>(contentDecoderMap))
.build(); .setRedirectStrategy(redirectStrategy)
.build();
client.start();
return client;
} }
private PoolingHttpClientConnectionManager newConnectionManager( private PoolingAsyncClientConnectionManager newConnectionManager(
CommaFeedConfiguration config, int poolSize) { CommaFeedConfiguration config, int poolSize) {
SSLFactory sslFactory = SSLFactory sslFactory =
SSLFactory.builder().withUnsafeTrustMaterial().withUnsafeHostnameVerifier().build(); SSLFactory.builder().withUnsafeTrustMaterial().withUnsafeHostnameVerifier().build();
@@ -118,8 +124,8 @@ public class HttpClientFactory {
? new BlockLocalAddressesDnsResolver(DNS_RESOLVER) ? new BlockLocalAddressesDnsResolver(DNS_RESOLVER)
: DNS_RESOLVER; : DNS_RESOLVER;
return PoolingHttpClientConnectionManagerBuilder.create() return PoolingAsyncClientConnectionManagerBuilder.create()
.setTlsSocketStrategy(Apache5SslUtils.toTlsSocketStrategy(sslFactory)) .setTlsStrategy(Apache5SslUtils.toTlsStrategy(sslFactory))
.setDefaultConnectionConfig( .setDefaultConnectionConfig(
ConnectionConfig.custom() ConnectionConfig.custom()
.setConnectTimeout(Timeout.of(config.httpClient().connectTimeout())) .setConnectTimeout(Timeout.of(config.httpClient().connectTimeout()))
@@ -129,6 +135,7 @@ public class HttpClientFactory {
.build()) .build())
.setDefaultTlsConfig( .setDefaultTlsConfig(
TlsConfig.custom() TlsConfig.custom()
.setVersionPolicy(HttpVersionPolicy.NEGOTIATE)
.setHandshakeTimeout( .setHandshakeTimeout(
Timeout.of(config.httpClient().sslHandshakeTimeout())) Timeout.of(config.httpClient().sslHandshakeTimeout()))
.build()) .build())

View File

@@ -6,7 +6,6 @@ import com.commafeed.CommaFeedConfiguration.HttpClientCache;
import com.google.common.cache.Cache; import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheBuilder;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
import com.google.common.io.ByteStreams;
import com.google.common.net.HttpHeaders; import com.google.common.net.HttpHeaders;
import jakarta.inject.Singleton; import jakarta.inject.Singleton;
@@ -17,39 +16,53 @@ import lombok.EqualsAndHashCode;
import lombok.Getter; import lombok.Getter;
import lombok.Lombok; import lombok.Lombok;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.experimental.Delegate;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.hc.client5.http.async.methods.SimpleHttpRequest;
import org.apache.hc.client5.http.async.methods.SimpleRequestBuilder;
import org.apache.hc.client5.http.async.methods.SimpleRequestProducer;
import org.apache.hc.client5.http.config.RequestConfig; import org.apache.hc.client5.http.config.RequestConfig;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
import org.apache.hc.client5.http.protocol.HttpClientContext; import org.apache.hc.client5.http.protocol.HttpClientContext;
import org.apache.hc.client5.http.protocol.RedirectLocations; import org.apache.hc.client5.http.protocol.RedirectLocations;
import org.apache.hc.client5.http.utils.DateUtils; import org.apache.hc.client5.http.utils.DateUtils;
import org.apache.hc.core5.http.ClassicHttpRequest; import org.apache.hc.core5.concurrent.FutureCallback;
import org.apache.hc.core5.http.HttpEntity; import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.EntityDetails;
import org.apache.hc.core5.http.HttpException;
import org.apache.hc.core5.http.HttpStatus; import org.apache.hc.core5.http.HttpStatus;
import org.apache.hc.core5.http.Message;
import org.apache.hc.core5.http.NameValuePair; import org.apache.hc.core5.http.NameValuePair;
import org.apache.hc.core5.http.io.support.ClassicRequestBuilder; import org.apache.hc.core5.http.nio.AsyncEntityConsumer;
import org.apache.hc.core5.util.Timeout; import org.apache.hc.core5.http.nio.AsyncRequestProducer;
import org.apache.hc.core5.http.nio.AsyncResponseConsumer;
import org.apache.hc.core5.http.nio.entity.AbstractBinAsyncEntityConsumer;
import org.apache.hc.core5.http.nio.support.BasicResponseConsumer;
import org.jboss.resteasy.reactive.common.headers.CacheControlDelegate; import org.jboss.resteasy.reactive.common.headers.CacheControlDelegate;
import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream;
import java.net.URI; import java.net.URI;
import java.nio.ByteBuffer;
import java.time.Duration; import java.time.Duration;
import java.time.Instant; import java.time.Instant;
import java.time.InstantSource; import java.time.InstantSource;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
/** Smart HTTP getter: handles gzip, ssl, last modified and etag headers */ /** Smart HTTP getter: handles gzip, ssl, last modified, and etag headers */
@Singleton @Singleton
@Slf4j @Slf4j
public class HttpGetter { public class HttpGetter {
private final CommaFeedConfiguration config; private final CommaFeedConfiguration config;
private final InstantSource instantSource; private final InstantSource instantSource;
private final CloseableHttpClient client; private final CloseableHttpAsyncClient client;
private final Cache<HttpRequest, HttpResponse> cache; private final Cache<HttpRequest, HttpResponse> cache;
public HttpGetter( public HttpGetter(
@@ -150,70 +163,96 @@ public class HttpGetter {
HttpClientContext context = HttpClientContext.create(); HttpClientContext context = HttpClientContext.create();
context.setRequestConfig( context.setRequestConfig(
RequestConfig.custom() RequestConfig.custom()
.setResponseTimeout(Timeout.of(config.httpClient().responseTimeout()))
// causes issues with some feeds // causes issues with some feeds
// see https://github.com/Athou/commafeed/issues/1572 // see https://github.com/Athou/commafeed/issues/1572
// and https://issues.apache.org/jira/browse/HTTPCLIENT-2344 // and https://issues.apache.org/jira/browse/HTTPCLIENT-2344
.setProtocolUpgradeEnabled(false) .setProtocolUpgradeEnabled(false)
.build()); .build());
return client.execute( long maxResponseSize = config.httpClient().maxResponseSize().asLongValue();
request.toClassicHttpRequest(), AsyncRequestProducer req = SimpleRequestProducer.create(request.toSimpleHttpRequest());
context, AsyncResponseConsumer<Message<org.apache.hc.core5.http.HttpResponse, byte[]>> resp =
resp -> { new BasicResponseConsumer<>(
byte[] content = new LimitedContentLengthEntityConsumer(
resp.getEntity() == null new LimitedBytesEntityConsumer(maxResponseSize), maxResponseSize));
? null FutureCallback<Message<org.apache.hc.core5.http.HttpResponse, byte[]>> callback =
: toByteArray( new FutureCallback<>() {
resp.getEntity(), @Override
config.httpClient().maxResponseSize().asLongValue()); public void completed(
int code = resp.getCode(); Message<org.apache.hc.core5.http.HttpResponse, byte[]> result) {}
String lastModifiedHeader =
Optional.ofNullable(resp.getFirstHeader(HttpHeaders.LAST_MODIFIED))
.map(NameValuePair::getValue)
.map(StringUtils::trimToNull)
.orElse(null);
String eTagHeader =
Optional.ofNullable(resp.getFirstHeader(HttpHeaders.ETAG))
.map(NameValuePair::getValue)
.map(StringUtils::trimToNull)
.orElse(null);
CacheControl cacheControl = @Override
Optional.ofNullable(resp.getFirstHeader(HttpHeaders.CACHE_CONTROL)) public void failed(Exception ex) {}
.map(NameValuePair::getValue)
.map(StringUtils::trimToNull)
.map(HttpGetter::toCacheControl)
.orElse(null);
Instant retryAfter = @Override
Optional.ofNullable(resp.getFirstHeader(HttpHeaders.RETRY_AFTER)) public void cancelled() {}
.map(NameValuePair::getValue) };
.map(StringUtils::trimToNull) Future<Message<org.apache.hc.core5.http.HttpResponse, byte[]>> future =
.map(this::toInstant) client.execute(req, resp, context, callback);
.orElse(null);
String contentType = try {
Optional.ofNullable(resp.getEntity()) Message<org.apache.hc.core5.http.HttpResponse, byte[]> message =
.map(HttpEntity::getContentType) future.get(config.httpClient().responseTimeout().toSeconds(), TimeUnit.SECONDS);
.orElse(null);
String urlAfterRedirect =
Optional.ofNullable(context.getRedirectLocations())
.map(RedirectLocations::getAll)
.map(l -> Iterables.getLast(l, null))
.map(URI::toString)
.orElse(request.getUrl());
return new HttpResponse( byte[] content = message.getBody();
code, int code = message.getHead().getCode();
lastModifiedHeader, String lastModifiedHeader =
eTagHeader, Optional.ofNullable(message.getHead().getFirstHeader(HttpHeaders.LAST_MODIFIED))
cacheControl, .map(NameValuePair::getValue)
retryAfter, .map(StringUtils::trimToNull)
content, .orElse(null);
contentType, String eTagHeader =
urlAfterRedirect); Optional.ofNullable(message.getHead().getFirstHeader(HttpHeaders.ETAG))
}); .map(NameValuePair::getValue)
.map(StringUtils::trimToNull)
.orElse(null);
CacheControl cacheControl =
Optional.ofNullable(message.getHead().getFirstHeader(HttpHeaders.CACHE_CONTROL))
.map(NameValuePair::getValue)
.map(StringUtils::trimToNull)
.map(HttpGetter::toCacheControl)
.orElse(null);
Instant retryAfter =
Optional.ofNullable(message.getHead().getFirstHeader(HttpHeaders.RETRY_AFTER))
.map(NameValuePair::getValue)
.map(StringUtils::trimToNull)
.map(this::toInstant)
.orElse(null);
String contentType =
Optional.ofNullable(message.getHead().getFirstHeader(HttpHeaders.CONTENT_TYPE))
.map(NameValuePair::getValue)
.map(StringUtils::trimToNull)
.orElse(null);
String urlAfterRedirect =
Optional.ofNullable(context.getRedirectLocations())
.map(RedirectLocations::getAll)
.map(l -> Iterables.getLast(l, null))
.map(URI::toString)
.orElse(request.getUrl());
return new HttpResponse(
code,
lastModifiedHeader,
eTagHeader,
cacheControl,
retryAfter,
content,
contentType,
urlAfterRedirect);
} catch (InterruptedException e) {
future.cancel(true);
Thread.currentThread().interrupt();
throw new RuntimeException("interrupted while fetching " + request.getUrl(), e);
} catch (TimeoutException e) {
future.cancel(true);
throw new IOException("timed out while fetching " + request.getUrl(), e);
} catch (ExecutionException e) {
future.cancel(true);
throw Lombok.sneakyThrow(e.getCause());
}
} }
private static CacheControl toCacheControl(String headerValue) { private static CacheControl toCacheControl(String headerValue) {
@@ -237,28 +276,6 @@ public class HttpGetter {
return DateUtils.parseStandardDate(headerValue); return DateUtils.parseStandardDate(headerValue);
} }
private static byte[] toByteArray(HttpEntity entity, long maxBytes) throws IOException {
if (entity.getContentLength() > maxBytes) {
throw new IOException(
"Response size (%s bytes) exceeds the maximum allowed size (%s bytes)"
.formatted(entity.getContentLength(), maxBytes));
}
try (InputStream input = entity.getContent()) {
if (input == null) {
return null;
}
byte[] bytes = ByteStreams.limit(input, maxBytes + 1).readAllBytes();
if (bytes.length > maxBytes) {
throw new IOException(
"Response size exceeds the maximum allowed size (%s bytes)"
.formatted(maxBytes));
}
return bytes;
}
}
private static Cache<HttpRequest, HttpResponse> newCache(CommaFeedConfiguration config) { private static Cache<HttpRequest, HttpResponse> newCache(CommaFeedConfiguration config) {
HttpClientCache cacheConfig = config.httpClient().cache(); HttpClientCache cacheConfig = config.httpClient().cache();
if (!cacheConfig.enabled()) { if (!cacheConfig.enabled()) {
@@ -274,6 +291,60 @@ public class HttpGetter {
.build(); .build();
} }
private record LimitedContentLengthEntityConsumer(
@Delegate AsyncEntityConsumer<byte[]> delegate, long maxBytes)
implements AsyncEntityConsumer<byte[]> {
@Override
public void streamStart(EntityDetails entityDetails, FutureCallback<byte[]> resultCallback)
throws HttpException, IOException {
long contentLength = entityDetails.getContentLength();
if (contentLength > maxBytes) {
throw new IOException(
"Response size (%s bytes) exceeds the maximum allowed size (%s bytes)"
.formatted(contentLength, maxBytes));
}
delegate.streamStart(entityDetails, resultCallback);
}
}
@RequiredArgsConstructor
private static class LimitedBytesEntityConsumer extends AbstractBinAsyncEntityConsumer<byte[]> {
private final long maxBytes;
private final ByteArrayOutputStream out = new ByteArrayOutputStream();
@Override
protected void streamStart(ContentType contentType) {}
@Override
protected int capacityIncrement() {
return Integer.MAX_VALUE;
}
@Override
protected void data(ByteBuffer src, boolean endOfStream) throws IOException {
if (out.size() + src.remaining() > maxBytes) {
throw new IOException(
"Response size exceeds the maximum allowed size (%s bytes)"
.formatted(maxBytes));
}
byte[] chunk = new byte[src.remaining()];
src.get(chunk);
out.write(chunk, 0, chunk.length);
}
@Override
protected byte[] generateContent() {
return out.toByteArray();
}
@Override
public void releaseResources() {
out.reset();
}
}
public static class SchemeNotAllowedException extends Exception { public static class SchemeNotAllowedException extends Exception {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@@ -336,15 +407,15 @@ public class HttpGetter {
return new HttpRequestBuilder().url(url); return new HttpRequestBuilder().url(url);
} }
public ClassicHttpRequest toClassicHttpRequest() { public SimpleHttpRequest toSimpleHttpRequest() {
ClassicHttpRequest req = ClassicRequestBuilder.get(url).build(); SimpleRequestBuilder builder = SimpleRequestBuilder.get(url);
if (lastModified != null) { if (lastModified != null) {
req.addHeader(HttpHeaders.IF_MODIFIED_SINCE, lastModified); builder.addHeader(HttpHeaders.IF_MODIFIED_SINCE, lastModified);
} }
if (eTag != null) { if (eTag != null) {
req.addHeader(HttpHeaders.IF_NONE_MATCH, eTag); builder.addHeader(HttpHeaders.IF_NONE_MATCH, eTag);
} }
return req; return builder.build();
} }
} }

View File

@@ -148,6 +148,7 @@ public class FeedEntryContentCleaningService {
whitelist.addProtocols("a", "href", "ftp", "http", "https", "magnet", "mailto"); whitelist.addProtocols("a", "href", "ftp", "http", "https", "magnet", "mailto");
whitelist.addProtocols("blockquote", "cite", "http", "https"); whitelist.addProtocols("blockquote", "cite", "http", "https");
whitelist.addProtocols("iframe", "src", "http", "https");
whitelist.addProtocols("img", "src", "http", "https"); whitelist.addProtocols("img", "src", "http", "https");
whitelist.addProtocols("q", "cite", "http", "https"); whitelist.addProtocols("q", "cite", "http", "https");

View File

@@ -16,26 +16,33 @@ import jakarta.inject.Singleton;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.hc.client5.http.classic.methods.HttpPost; import org.apache.hc.client5.http.async.methods.SimpleHttpRequest;
import org.apache.hc.client5.http.config.RequestConfig; import org.apache.hc.client5.http.async.methods.SimpleRequestBuilder;
import org.apache.hc.client5.http.entity.UrlEncodedFormEntity; import org.apache.hc.client5.http.async.methods.SimpleRequestProducer;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
import org.apache.hc.core5.http.ContentType; import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.HttpResponse;
import org.apache.hc.core5.http.Message;
import org.apache.hc.core5.http.NameValuePair; import org.apache.hc.core5.http.NameValuePair;
import org.apache.hc.core5.http.io.entity.StringEntity;
import org.apache.hc.core5.http.message.BasicNameValuePair; import org.apache.hc.core5.http.message.BasicNameValuePair;
import org.apache.hc.core5.util.Timeout; import org.apache.hc.core5.http.nio.entity.DiscardingEntityConsumer;
import org.apache.hc.core5.http.nio.support.BasicResponseConsumer;
import org.apache.hc.core5.net.WWWFormCodec;
import java.io.IOException; import java.io.IOException;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
@Singleton @Singleton
@Slf4j @Slf4j
public class PushNotificationService { public class PushNotificationService {
private final CloseableHttpClient httpClient; private final CloseableHttpAsyncClient httpClient;
private final Meter meter; private final Meter meter;
private final CommaFeedConfiguration config; private final CommaFeedConfiguration config;
@@ -97,13 +104,9 @@ public class PushNotificationService {
return; return;
} }
HttpPost request = new HttpPost(serverUrl + "/" + topic); SimpleRequestBuilder request = SimpleRequestBuilder.post(serverUrl + "/" + topic);
request.setConfig(
RequestConfig.custom()
.setResponseTimeout(Timeout.of(config.httpClient().responseTimeout()))
.build());
request.addHeader("Title", feedTitle); request.addHeader("Title", feedTitle);
request.setEntity(new StringEntity(entryTitle, StandardCharsets.UTF_8)); request.setBody(entryTitle, ContentType.TEXT_PLAIN.withCharset(StandardCharsets.UTF_8));
if (StringUtils.isNotBlank(entryUrl)) { if (StringUtils.isNotBlank(entryUrl)) {
request.addHeader("Click", entryUrl); request.addHeader("Click", entryUrl);
@@ -113,15 +116,7 @@ public class PushNotificationService {
request.addHeader("Authorization", "Bearer " + settings.getUserSecret()); request.addHeader("Authorization", "Bearer " + settings.getUserSecret());
} }
httpClient.execute( send("ntfy", request.build());
request,
response -> {
if (response.getCode() >= 400) {
throw new PushNotificationException(
"ntfy notification failed with status " + response.getCode());
}
return null;
});
} }
private void sendGotify( private void sendGotify(
@@ -152,23 +147,11 @@ public class PushNotificationService {
.put("click", new JsonObject().put("url", entryUrl)))); .put("click", new JsonObject().put("url", entryUrl))));
} }
HttpPost request = new HttpPost(serverUrl + "/message"); SimpleRequestBuilder request = SimpleRequestBuilder.post(serverUrl + "/message");
request.setConfig(
RequestConfig.custom()
.setResponseTimeout(Timeout.of(config.httpClient().responseTimeout()))
.build());
request.addHeader("X-Gotify-Key", token); request.addHeader("X-Gotify-Key", token);
request.setEntity(new StringEntity(json.toString(), ContentType.APPLICATION_JSON)); request.setBody(json.toString(), ContentType.APPLICATION_JSON);
httpClient.execute( send("gotify", request.build());
request,
response -> {
if (response.getCode() >= 400) {
throw new PushNotificationException(
"gotify notification failed with status " + response.getCode());
}
return null;
});
} }
private void sendPushover( private void sendPushover(
@@ -194,22 +177,40 @@ public class PushNotificationService {
params.add(new BasicNameValuePair("url", entryUrl)); params.add(new BasicNameValuePair("url", entryUrl));
} }
HttpPost request = new HttpPost("https://api.pushover.net/1/messages.json"); SimpleRequestBuilder request =
request.setConfig( SimpleRequestBuilder.post("https://api.pushover.net/1/messages.json");
RequestConfig.custom() request.setBody(
.setResponseTimeout(Timeout.of(config.httpClient().responseTimeout())) WWWFormCodec.format(params, StandardCharsets.UTF_8),
.build()); ContentType.APPLICATION_FORM_URLENCODED.withCharset(StandardCharsets.UTF_8));
request.setEntity(new UrlEncodedFormEntity(params, StandardCharsets.UTF_8));
httpClient.execute( send("pushover", request.build());
request, }
response -> {
if (response.getCode() >= 400) { private void send(String name, SimpleHttpRequest request) throws IOException {
throw new PushNotificationException( Future<Message<HttpResponse, Object>> future =
"pushover notification failed with status " + response.getCode()); httpClient.execute(
} SimpleRequestProducer.create(request),
return null; new BasicResponseConsumer<>(new DiscardingEntityConsumer<>()),
}); null);
try {
HttpResponse response =
future.get(config.httpClient().responseTimeout().toSeconds(), TimeUnit.SECONDS)
.getHead();
if (response.getCode() >= 400) {
throw new PushNotificationException(
name + " notification failed with status " + response.getCode());
}
} catch (InterruptedException e) {
future.cancel(true);
Thread.currentThread().interrupt();
throw new IOException("interrupted while sending " + name + " notification", e);
} catch (TimeoutException e) {
future.cancel(true);
throw new IOException("timed out while sending " + name + " notification", e);
} catch (ExecutionException e) {
future.cancel(true);
throw new IOException(e.getCause());
}
} }
public static class PushNotificationException extends RuntimeException { public static class PushNotificationException extends RuntimeException {

View File

@@ -11,6 +11,8 @@ import com.google.common.net.HttpHeaders;
import io.quarkus.runtime.configuration.MemorySize; import io.quarkus.runtime.configuration.MemorySize;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.hc.client5.http.ConnectTimeoutException; import org.apache.hc.client5.http.ConnectTimeoutException;
import org.apache.hc.core5.http.HttpStatus; import org.apache.hc.core5.http.HttpStatus;
@@ -29,12 +31,12 @@ import org.mockserver.model.Delay;
import org.mockserver.model.HttpRequest; import org.mockserver.model.HttpRequest;
import org.mockserver.model.HttpResponse; import org.mockserver.model.HttpResponse;
import org.mockserver.model.MediaType; import org.mockserver.model.MediaType;
import org.mockserver.model.Protocol;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.net.NoRouteToHostException; import java.net.NoRouteToHostException;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException; import java.net.UnknownHostException;
import java.time.Duration; import java.time.Duration;
import java.time.Instant; import java.time.Instant;
@@ -45,6 +47,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.zip.DeflaterOutputStream; import java.util.zip.DeflaterOutputStream;
import java.util.zip.GZIPOutputStream; import java.util.zip.GZIPOutputStream;
@Slf4j
class HttpGetterTest { class HttpGetterTest {
private static final Instant NOW = Instant.now(); private static final Instant NOW = Instant.now();
@@ -237,7 +240,7 @@ class HttpGetterTest {
.when(HttpRequest.request().withMethod("GET")) .when(HttpRequest.request().withMethod("GET"))
.respond(HttpResponse.response().withDelay(Delay.milliseconds(1000))); .respond(HttpResponse.response().withDelay(Delay.milliseconds(1000)));
Assertions.assertThrows(SocketTimeoutException.class, () -> getter.get(this.feedUrl)); Assertions.assertThrows(IOException.class, () -> getter.get(this.feedUrl));
} }
@Test @Test
@@ -416,7 +419,7 @@ class HttpGetterTest {
@Nested @Nested
class Compression { class Compression {
private static final String ACCEPT_ENCODING = "gzip, deflate, br"; private static final String ACCEPT_ENCODING = "deflate, gzip";
@Test @Test
void gzip() throws Exception { void gzip() throws Exception {
@@ -437,24 +440,30 @@ class HttpGetterTest {
.when(HttpRequest.request().withMethod("GET")) .when(HttpRequest.request().withMethod("GET"))
.respond( .respond(
req -> { req -> {
String acceptEncodingHeader = try {
req.getFirstHeader(HttpHeaders.ACCEPT_ENCODING); String acceptEncodingHeader =
if (!ACCEPT_ENCODING.equals(acceptEncodingHeader)) { req.getFirstHeader(HttpHeaders.ACCEPT_ENCODING);
throw new Exception( if (!ACCEPT_ENCODING.equals(acceptEncodingHeader)) {
"Wrong value in the Accept-Encoding header, should be '%s' but was '%s'" throw new Exception(
.formatted( "Wrong value in the Accept-Encoding header, should be '%s' but was '%s'"
ACCEPT_ENCODING, acceptEncodingHeader)); .formatted(
} ACCEPT_ENCODING,
acceptEncodingHeader));
}
ByteArrayOutputStream output = new ByteArrayOutputStream(); ByteArrayOutputStream output = new ByteArrayOutputStream();
try (OutputStream compressionOutputStream = try (OutputStream compressionOutputStream =
compressionFunction.apply(output)) { compressionFunction.apply(output)) {
compressionOutputStream.write(body.getBytes()); compressionOutputStream.write(body.getBytes());
} }
return HttpResponse.response() return HttpResponse.response()
.withBody(output.toByteArray()) .withBody(output.toByteArray())
.withHeader(HttpHeaders.CONTENT_ENCODING, encoding); .withHeader(HttpHeaders.CONTENT_ENCODING, encoding);
} catch (Exception e) {
log.error("Error in compression callback", e);
throw e;
}
}); });
HttpResult result = getter.get(HttpGetterTest.this.feedUrl); HttpResult result = getter.get(HttpGetterTest.this.feedUrl);
@@ -590,4 +599,30 @@ class HttpGetterTest {
UnknownHostException.class, () -> getter.get("http://[::a00:1]")); // 10.0.0.1 UnknownHostException.class, () -> getter.get("http://[::a00:1]")); // 10.0.0.1
} }
} }
@Nested
class Protocols {
@Test
void usesHttp2OverTls() throws Exception {
mockServerClient
.when(HttpRequest.request().withMethod("GET").withProtocol(Protocol.HTTP_2))
.respond(HttpResponse.response().withBody("h2"));
mockServerClient
.when(HttpRequest.request().withMethod("GET").withProtocol(Protocol.HTTP_1_1))
.respond(HttpResponse.response().withBody("h1"));
HttpResult result = getter.get("https://localhost:" + mockServerClient.getPort());
Assertions.assertEquals("h2", new String(result.content()));
}
@Test
void fallsBackToHttp1OverCleartext() throws Exception {
mockServerClient
.when(HttpRequest.request().withMethod("GET").withProtocol(Protocol.HTTP_1_1))
.respond(HttpResponse.response().withBody("h1"));
HttpResult result = getter.get("http://localhost:" + mockServerClient.getPort());
Assertions.assertEquals("h1", new String(result.content()));
}
}
} }

View File

@@ -15,7 +15,7 @@ class FeedEntryContentCleaningServiceTest {
<p> <p>
Some text Some text
<img width="965" height="320" src="https://localhost/an-image.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="alt-desc" decoding="async" sizes="(max-width: 965px) 100vw, 965px" style="width: 100%; opacity: 0"> <img width="965" height="320" src="https://localhost/an-image.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="alt-desc" decoding="async" sizes="(max-width: 965px) 100vw, 965px" style="width: 100%; opacity: 0">
<iframe src="url" style="width: 100%; opacity: 0"></iframe> <iframe src="https://localhost/an-iframe" style="width: 100%; opacity: 0"></iframe>
<forbidden-element>aaa</forbidden-element> <forbidden-element>aaa</forbidden-element>
"""; """;
String result = feedEntryContentCleaningService.clean(content, "baseUri", false); String result = feedEntryContentCleaningService.clean(content, "baseUri", false);
@@ -25,7 +25,7 @@ class FeedEntryContentCleaningServiceTest {
<p> <p>
Some text Some text
<img width="965" height="320" src="https://localhost/an-image.png" alt="alt-desc" style="width:100%;"> <img width="965" height="320" src="https://localhost/an-image.png" alt="alt-desc" style="width:100%;">
<iframe src="url" style="width:100%;"></iframe> <iframe src="https://localhost/an-iframe" style="width:100%;"></iframe>
aaa aaa
</p> </p>
""" """

View File

@@ -5,7 +5,7 @@
<groupId>com.commafeed</groupId> <groupId>com.commafeed</groupId>
<artifactId>commafeed</artifactId> <artifactId>commafeed</artifactId>
<version>7.3.2</version> <version>7.4.1</version>
<name>CommaFeed</name> <name>CommaFeed</name>
<packaging>pom</packaging> <packaging>pom</packaging>
@@ -19,7 +19,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version> <version>3.16.0</version>
<configuration> <configuration>
<parameters>true</parameters> <parameters>true</parameters>