Commit Graph

17757 Commits

Author SHA1 Message Date
DariusIII f0f17def8c Merge pull request #1861 from joemeyer76/fix/nntp-getxover-return-type
Fix NNTPService::getXOVER() TypeError on NNTP error responses
2026-07-04 09:28:08 +02:00
joemeyer76 b0fd5491a0 Fix NNTPService::getXOVER() TypeError on NNTP error responses
getXOVER() declared its return type as `array|string|NNTPService`, which
does not include DariusIII\NetNntp\Error. The underlying NNTP client
legitimately returns an Error object whenever the server responds with
an error to an XOVER command (e.g. a group with no matching articles,
or a range past the group's high-water mark) -- both call sites in
BinariesService already guard for exactly this case via
NNTPService::isError($result). Because the declared return type
excluded Error, PHP raised a TypeError before either caller ever got a
chance to run that check:

    App\Services\NNTP\NNTPService::getXOVER(): Return value must be of
    type App\Services\NNTP\NNTPService|array|string, DariusIII\NetNntp\Error
    returned

In practice this crashed the first XOVER call that hit any error
response, which made historical backfill (`update:backfill` /
`multiprocessing:backfill`) unusable beyond the very first successful
chunk for a group -- backfill by its nature keeps requesting older and
older ranges until it walks off the group's actual history, at which
point the server error becomes inevitable.

Every sibling method on this class that the NNTP client can answer with
an Error object (doConnect, doQuit, getOverview, getGroups, getMessages,
getMessagesByMessageID) already declares `mixed` for this same reason.
This change brings getXOVER() in line with that existing convention
rather than introducing a new pattern.

Added a regression test that uses reflection to assert getXOVER()'s
return type permits DariusIII\NetNntp\Error (or is unrestricted via
`mixed`), plus a sanity check that NNTPService::isError() correctly
identifies Error instances. Verified the test fails against the old
`array|string|NNTPService` signature and passes against `mixed`.

Manually verified against a live NNTP server: `update:backfill` on a
real group ran 15+ chunks past the point where it previously crashed on
the very first error response, with no exceptions.
2026-07-03 20:21:36 -04:00
DariusIII 09ad515969 Update proxy blocking 2026-07-02 13:47:12 +02:00
DariusIII ffff25307b Remove xcertain *arr apps 2026-07-02 13:36:14 +02:00
DariusIII 7b5313e97e Update detection 2026-07-02 11:43:08 +02:00
DariusIII 3faeb1d63a Fix blocking issue 2026-07-01 14:44:16 +02:00
DariusIII 95fed139b3 Update used packages 2026-07-01 14:22:49 +02:00
DariusIII 0790d2290c Hide sensitive info from log 2026-06-30 19:05:15 +02:00
DariusIII 5b927b4581 Update blocking of abusive services 2026-06-30 17:28:09 +02:00
DariusIII 2b12bd8d0c Update used packages to their latest versions 2026-06-30 13:09:33 +02:00
DariusIII ada6ab08c8 Update docker 2026-06-29 14:22:35 +02:00
DariusIII 8b2633deb2 Merge pull request #1859 from NNTmux/copilot/fix-github-actions-php-8-5
Fix failing GitHub Actions "PHP 8.5" job: switch to composer install
2026-06-28 21:38:05 +02:00
copilot-swe-agent[bot] 3af1b15f48 fix: add missing array $headers parameter to output() overrides in tests 2026-06-28 19:19:04 +00:00
copilot-swe-agent[bot] c277fa461f fix: switch composer update to composer install in CI to avoid GitHub API rate limiting 2026-06-28 19:10:37 +00:00
copilot-swe-agent[bot] d7c6c61bdf Fix PHP 8.5 CI failure: authenticate Composer with GitHub token for VCS deps 2026-06-28 18:27:21 +00:00
copilot-swe-agent[bot] d6eec9b425 Initial plan 2026-06-28 18:23:29 +00:00
DariusIII 4e1b672e92 Update used packages to their latest versions 2026-06-28 19:53:23 +02:00
DariusIII 8f0fbd5dc6 Update used packages to their latest versions 2026-06-26 23:23:44 +02:00
DariusIII afe6202460 Fix multiple user id queries 2026-06-26 23:19:30 +02:00
DariusIII bb2658c48f Fix update command 2026-06-24 20:33:02 +02:00
DariusIII cf138fae03 Update used packages to their latest versions 2026-06-24 18:25:13 +02:00
DariusIII 394c681c27 Fix release deletion from admin releases list 2026-06-24 18:22:54 +02:00
DariusIII cfa46e477b Add missing test 2026-06-24 16:56:10 +02:00
DariusIII 09f57f275e Add doc 2026-06-22 22:01:06 +02:00
DariusIII dbeb6a3c49 Add missing class 2026-06-22 21:59:31 +02:00
DariusIII 9f26447d8e Update config 2026-06-22 21:50:18 +02:00
DariusIII 5f5ce7b4b1 Add missing files 2026-06-22 21:24:58 +02:00
DariusIII 87b0a9d7a6 Update manticore config 2026-06-22 21:21:39 +02:00
DariusIII 74d874c17b Update manticoresearch support for latest version changes 2026-06-22 21:12:38 +02:00
DariusIII c2024b75c8 Update used packages to their latest versions 2026-06-22 19:52:00 +02:00
DariusIII 8d1d238f5f Update Trakt support 2026-06-19 23:22:16 +02:00
DariusIII 50c7f27547 Update used packages to their latest versions 2026-06-18 12:04:59 +02:00
DariusIII 2f96d921df Fix RSS health check 2026-06-17 13:34:13 +02:00
DariusIII 995c215be9 CS fixes 2026-06-17 12:31:33 +02:00
DariusIII 580f5a1589 Fix issues in GDPR support 2026-06-17 12:26:04 +02:00
DariusIII f4df259b71 Add missing view 2026-06-17 11:22:34 +02:00
DariusIII 6950759227 Add missing migrations 2026-06-17 10:38:21 +02:00
DariusIII ab41b91af5 Add GDPR compliance 2026-06-17 09:49:39 +02:00
DariusIII de50ae6308 Update used packages to their latest versions 2026-06-16 22:23:57 +02:00
DariusIII ca76cebbaf Fix error in admin 2026-06-15 12:31:39 +02:00
DariusIII d9c4cf2d7e Update bulk user actions 2026-06-15 12:15:10 +02:00
DariusIII 3656cf9972 Update node packages 2026-06-15 11:45:49 +02:00
DariusIII 96f6900306 Add user bulk actions 2026-06-15 11:36:03 +02:00
DariusIII a7a6479e93 Fix email verification url 2026-06-15 01:26:34 +02:00
DariusIII b6b3828d5a Merge pull request #1858 from Kcchouette/fix/stripos-reversed-args
fix: correct reversed stripos/strpos arguments in ConsoleService
2026-06-13 23:07:19 +02:00
Kcchouette e5df723720 fix: correct reversed stripos/strpos arguments in ConsoleService
Fix 5 instances of stripos('literal', ) where arguments were
reversed, causing the needle to be searched inside a short literal
instead of the literal inside the variable:

- Line 599: stripos('dlc', ) → stripos(, 'dlc') — DLC
  branch was never entered for real game titles
- Line 601: stripos('Rock Band Network', ) → stripos(, ...)
  — Rock Band check was dead code inside the dead DLC branch
- Line 603: strpos('-', ) → str_contains(, '-') — DLC
  hyphen splitting never triggered
- Line 622: stripos('PSX2PSP', ) → stripos(, ...)
  — worked by accident (PSX is prefix of PSX2PSP)
- Line 626: stripos('XBLA', ) + stripos('dlc', ) →
  stripos(, ...) + stripos(, ...)

Also adds ConsoleServiceDlcParsingTest (9 tests) covering DLC title
parsing, Rock Band Network handling, hyphen splitting, and XBLA
platform upgrade.
2026-06-13 21:05:15 +02:00
DariusIII 1d2ed17e5f Merge pull request #1852 from Kcchouette/refactor/strpos-to-php8
refactor: replace strpos with PHP 8.x string functions
2026-06-13 20:25:06 +02:00
Kcchouette 062548f57a refactor: replace strpos with PHP 8.x string functions
- IRCClient: strpos(..., 'PONG') !== 0 → ! str_starts_with(...)
- IGDBService: strpos(, '//') === 0 → str_starts_with(...)
- Settings: strpos(, '.') !== false → str_contains(...)
- NntmuxCheckIndex: 3x strpos → str_contains

strpos with offset (YencService, MovieService, ReleaseRemoverService)
is left untouched as it is a legitimate use case.
2026-06-13 18:12:22 +02:00
DariusIII d733f75503 Update used packages 2026-06-12 10:17:01 +02:00
DariusIII 937913cbf8 CS fixes 2026-06-12 10:16:12 +02:00