vamsi2246 opened a new pull request, #5945:
URL: https://github.com/apache/couchdb/pull/5945

   ## Overview
   This PR fixes a critical unhandled exception bug in the global query server 
event loop (`loop.js`). 
   
   ## Details
   If a user document filter function throws `null` or `undefined`, the 
unhandled `null` bubbles up directly to `handleError(e)` in `loop.js`. This 
function immediately accesses `e[0]`, throwing a `TypeError: Cannot read 
properties of null`. Because `handleError` has no error boundary of its own, 
this completely crashes the `couchjs` OS process, failing the query system.
   
   A similar unsafe pattern exists in `validate.js`. 
   
   This patch adds explicit null checks to the global event handler, preventing 
arbitrary null exceptions from causing a full `couchjs` denial-of-service, 
ensuring they are properly returned as error messages over JSON instead.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to