Repository navigation
fix(nvhttp): bound GameStream requests before routing - #6098
NotUncleBob wants to merge 1 commit into
Conversation
|
Thanks for investigating these fixes and adding regression coverage. I don't want Sunshine to maintain dependency backports; please take an upstream-first approach here:
Sunshine-specific request limits and GameStream policy can remain in Sunshine, with the regression coverage retained. This is feedback on the dependency-maintenance approach, not a claim that the fixes themselves are incorrect or that full integration testing has passed. Review completed by Codex | Model: unavailable | Thinking: unavailable |
1ccd104 to
e300c0d
Compare
|
Thanks for the review, that makes sense. I went upstream first and trimmed this PR.
What's left is Sunshine's own part: the 64 KiB limit on GameStream requests and an Two things from the first version are not in this one:
I rebased on master and built I also ran a host built from this branch next to my installed one and used Moonlight 6.2.0 on Windows against it: pairing, the app list and launching work as before, and a 720p H.264 stream with the software encoder had video and audio. On the same host, a chunked request cut short on the plain HTTP port just closes that connection. The same tree without the two settings aborts the whole process on that one request ( |
e300c0d to
e141db8
Compare
|
I requested a new MiniUPnPc release containing the minixml bounds fixes in miniupnp/miniupnp#953, and upstream has now published MiniUPnPc 2.3.4. Sunshine already points to that release through #6111. I rebased this branch onto master. The diff remains limited to the Sunshine-specific 64 KiB GameStream request limit, error handler, and four regression tests. Local validation after the rebase passed: the Release/Werror build, all four HTTP regressions, the C++ suite (959 passed, 0 failed, 7 skipped), web tests (217), PowerShell tests (19), lint checks, and the seven MiniUPnPc 2.3.4 upstream tests. The description records the environment and limitations; this does not replace the full hosted CI matrix. CI, common lint, and CodeQL still require maintainer approval to run. Now that the new MiniUPnPc tag is available and Sunshine has adopted it, could you take another look and see whether we can move this scoped change forward? The Simple-Web-Server submissions remain separate upstream follow-ups. |
|
|
Re-reviewed the current The truncated-chunk tests cover the two unchecked error-callback paths in the pinned reader, while the other tests exercise an ordinary pairing-sized query and oversized header/body rejection. The Simple-Web-Server parser fixes and body-rejection option remain separate upstream follow-ups; this scoped mitigation does not replace them. Review completed by Codex | Model: unavailable | Thinking: unavailable |



Description
Bound requests on the two GameStream servers to 64 KiB and give them an
on_errorhandler, before routing or authentication. GameStream requests carry everything in the query string, including the pairing certificate, and have no body.With the pinned Simple-Web-Server, a chunked request cut short after its chunk data reaches an unchecked
on_errorcall and throwsstd::bad_function_callout of the server thread, which aborts Sunshine. Setting the handler avoids that until the library fix lands.The dependency fixes that were part of this PR at first went upstream instead:
Screenshot
Issues Fixed or Closed
Roadmap Issues
Testing
Validation after rebasing onto master at
5716a2ac(MiniUPnPc update #6111):npm ci --ignore-scripts,npm test(217 tests passed),npm run build, andnpm publish --dry-run --tag ci --ignore-scriptspassed.validateminixml.Earlier validation before this rebase (retained for context):
tests/unit/test_http_request_limits.cpp: a truncated chunk in one read and split over two reads, a 64 KiB header next to a pairing-sized query, and a body over the limit.test_sunshineon Fedora 44 with GCC 16.2.1 (Release,BUILD_WERROR=ON). The four tests pass, and all four fail without the settings inconfigure_gamestream_server./serverinfokeeps answering. The same tree without the settings inconfigure_gamestream_serveraborts the process on that request.Type of Change
Checklist
AI Usage
See our AI usage policy.