13 Commits
Author SHA1 Message Date
thatguygriff 6d7410e737 Merge pull request 'Use cURL for Bluesky API calls instead of file_get_contents' (#5) from fix/curl-transport-freshrss-130 into main
CI / test (push) Successful in 39s
Reviewed-on: #5
Reviewed-by: James Griffin-Allwood <[email protected]>
2026-09-10 13:35:36 +00:00
KydoimosandClaude Opus 5 583c489074 Use cURL for Bluesky API calls instead of file_get_contents
CI / test (pull_request) Successful in 40s
FreshRSS 1.30.0 added unregister_unsafe_protocols() to lib/lib_rss.php,
which unregisters every PHP stream wrapper except file:// and php:// at
boot as an SSRF mitigation. That removed the https:// wrapper, so the
stream-context-based fetch in apiGet() stopped working entirely — every
API call failed with "Unable to find the wrapper https".

Because the call site used @file_get_contents(), the failure was silent:
apiGet() returned null, loadThread() fell through to its null fallback,
and entries were saved with their unenriched RSS content. The visible
symptom was Bluesky posts rendering with no thread and no embeds, with
nothing in the logs to explain it.

Switch apiGet() to cURL, which does not go through stream wrappers (and
is how FreshRSS fetches feeds itself, which is why feed retrieval kept
working throughout). Connect timeout added and redirect-following
explicitly disabled — a public XRPC endpoint has no reason to redirect,
and following redirects would reopen an SSRF vector.

Also stop swallowing failures: transport errors, non-2xx responses and
malformed JSON are now reported via Minz_Log::warning() so this class of
breakage is visible next time.

Tests: add testApiGetWorksWithoutHttpsStreamWrapper, which unregisters
the https wrapper before calling the API and so fails against the old
implementation, plus testApiGetLogsWarningOnFailure. Add a Minz_Log stub
and curl to the CI extension list.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-10 10:32:55 -03:00
thatguygriffandClaude Opus 4.6 13f7f12499 Fix thread post spacing: add reply padding and increase margins
CI / test (pull_request) Successful in 1m5s
CI / test (push) Successful in 52s
Replies had no left padding from the border (padding-left:0) and too-tight
vertical spacing (margin:4px). Bump to padding-left:12px and margin:8px.

Closes #2

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-04-05 09:59:09 -03:00
thatguygriffandClaude Sonnet 4.6 bf72b74a01 Render embedded quoted posts as blockquotes with handle permalink
CI / test (pull_request) Successful in 42s
CI / test (push) Successful in 40s
Fixes #1. Replaces the plain div wrapper and separate "View on Bluesky"
link with a <blockquote> element, and makes the @handle the permalink
to the quoted post.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-04-05 09:39:41 -03:00
thatguygriffandClaude Sonnet 4.6 3950a65783 Filter thread replies to original author only
CI / test (push) Successful in 45s
Only replies from the root post's author are rendered; replies from other
users are skipped. Adds fixture and test for a real-world post with an
other-author reply (3mhypinzezo2l).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-27 12:16:02 -03:00
thatguygriffandClaude Sonnet 4.6 06067c0ff3 Update tests to reflect removal of reply authors and per-post permalinks
CI / test (push) Successful in 49s
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-27 12:05:24 -03:00
thatguygriffandClaude Sonnet 4.6 8a707f6c71 Add PostToolUse hook to run PHPUnit tests after every code edit
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-27 11:08:02 -03:00
thatguygriffandClaude Sonnet 4.6 5414739536 Remove reply/like stats and per-post permalinks from thread rendering
CI / test (push) Failing after 52s
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-27 11:02:23 -03:00
thatguygriffandClaude Sonnet 4.6 689c4d572f Remove author info from thread posts; keep it in quoted posts
CI / test (push) Successful in 54s
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-27 09:25:28 -03:00
thatguygriff 54ac4c31ce Allow claude to check tea action results 2026-03-27 09:18:29 -03:00
thatguygriffandClaude Sonnet 4.6 932d7a5f0e Add PHPUnit test suite, Gitea CI, and fix broken URL pattern
CI / test (push) Successful in 1m41s
- Add 22 unit tests covering feed parsing, thread rendering, facets,
  needsRefetch staleness windows, and handleConfigureAction
- Add FreshRSS class stubs so tests run without a full FreshRSS install
- Add RSS feed fixture (hockeyviz.com snapshot) and thread API fixture
  for post 3mhtk7awhrp26 (1 root + 2 replies)
- Add Gitea Actions workflow (.gitea/workflows/ci.yml) running on PHP 8.2
- Fix POST_URL_PATTERN: using '#' as PCRE delimiter with '#' inside a
  character class caused PHP to close the pattern early, so no Bluesky
  URL ever matched; switch delimiter to '~'

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-26 15:41:07 -03:00
thatguygriffandClaude Sonnet 4.6 ac3b584d66 Fix hook registration crash by using string hook names
Minz_HookType enum does not exist in this version of FreshRSS;
registerHook() expects plain strings.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-03-25 20:55:51 -03:00
thatguygriff c3f3efbf33 First commit 2026-03-25 20:50:17 -03:00