Repository navigation
Conversation
Two specs in spec/vulnerabilities.spec.js created a Parse.LiveQueryClient with serverURL 'ws://localhost:1337'. The test server runs its LiveQuery server on the Parse Server port 8378, and nothing listens on 1337, so the clients never connected: - The ReDoS spec asserted that the create event times out. That assertion also holds when the subscription never reaches the server, so the spec did not cover the regex timeout protection. - The type confusion spec subscribed with a malformed query through such a client, so the malformed query never reached the server. Point both clients at ws://localhost:8378 and wait for the subscription ACK before asserting, so the specs fail when the subscribe request does not reach the server.
|
I will reformat the title to use the proper commit message syntax. |
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Issue
Fixes #10720
Two specs in
spec/vulnerabilities.spec.jscreate aParse.LiveQueryClientwithserverURL: 'ws://localhost:1337'. The test server runs its LiveQuery server on the Parse Server port 8378 (startLiveQueryServer: truewithoutliveQueryServerOptions.port), and nothing listens on port 1337.Approach
Point both clients at
ws://localhost:8378, the port the test server's LiveQuery server actually listens on, and wait for the subscription ACK before asserting.Without the ACK wait, the ReDoS spec would still pass on a wrong URL: it asserts that the
createevent times out, which is also true when the subscription never reaches the server. Waiting foropenmakes the spec fail if the subscribe request does not reach the server.(GHSA-mf3j-86qx-cq5j) ReDoS via $regex in LiveQuery subscription: the subscription now reaches the server, so the timeout assertion measures the regex timeout protection instead of a dead client.(GHSA-fjxm-vhvc-gcmj) LiveQuery Operator Type Confusion>LiveQuery integration: the malformed query now reaches the server; if the server rejected it, the ACK wait fails the spec.Verification
Environment: Node 24.12.0, MongoDB 8.0.4 (mongodb-runner, standalone),
TESTING=1.alpha(specs unchanged): the ReDoS spec passes in 5.1 s, which is exactly its 5000 ms timeout — consistent with a client that never connects.npx jasmine spec/vulnerabilities.spec.js— 915 specs, 0 failures, 23 pending. All LiveQuery-filtered specs: 160 specs, 0 failures.ws://localhost:1337makes both specs fail (the ACK wait times out), confirming the specs now depend on a real connection.lib/LiveQuery/QueryTools.js(if (!regexTimeout)→if (true)) makes the ReDoS spec fail withExpected 34812 to be less than 6000, confirming the spec now covers the protection.npm run lintpasses.Tasks
Summary by CodeRabbit