github marketcalls/openalgo openalgo-frontend-hardening-react-router-security
v2.0.4.0

44 minutes ago

Version 2.0.4.0 Released

Date: 2nd December 2026

This release fixes every bug and security finding React Doctor reported in the React frontend and adds a CI gate that keeps new ones out, closes seven Dependabot advisories in React Router and ws, lets stop-loss orders waiting for their trigger be modified and cancelled, stops a second-device login from downloading the master contract again during market hours, and gives Zerodha quotes the exchange's trade time.

This is the first release after 2.0.3.9, with 7 commits since that bump, excluding automated frontend build commits and including this release. There is nothing to migrate: run cd upgrade && uv run migrate_all.py as usual and it reports nothing to do. Everyone gets the React Router and ws security fixes. Read the stop-loss item before upgrading if a strategy reads sandbox order statuses over the REST API, and the Zerodha item if you consume ltt from the market data feed.

Highlights

  • Frontend cleanup with a React Doctor gate in CI (d65432608) - React Doctor 0.9.23 reported 77 errors, 433 Bugs and 3 Security findings in the frontend. All are resolved: about 333 fixed in code and 103 marked as false positives, each with a written reason beside the code. The fixes a trader can notice: callbacks read by charts, sockets and the /scalping order hotkeys always see the values on screen; the order, modify, basket, stop-loss, save-strategy and add-model dialogs no longer show the previous values for a frame when they open; a failed server reply can no longer read as success (the broker TOTP login, webhook addresses that started with "undefined" on the TradingView, GoCharting and Chartink pages, a request sent without its security token); a late reply no longer overwrites a newer one on token search, Historify, holidays, the analyzer, Python strategy logs, login and Edit Python Strategy, which could save one strategy's code over another's; removing a row in the Portfolio Backtester or in Flow's custom legs no longer moves typed values onto the wrong row; the WebSocket test pages no longer leave a connection open or reconnect after you leave them; a double click no longer sends two password changes. A new frontend-react-doctor CI job fails on any new error or Bugs or Security finding (npm run doctor in frontend/, version pinned), and the react-audit skill records the fixes this codebase uses and how to mark a false positive.
  • React Router and ws security update (4ea7139a3) - React Router moves from 8.3.0 to 8.5.3 and ws from 8.21.0 to 8.23.1, closing seven Dependabot advisories. React Router: a polynomial-time ReDoS in matchPath and matchRoutes, prototype pollution in its vendored turbo-stream deserializer, an unbounded route-manifest expansion during server rendering, a cross-scheme CSRF bypass in origin validation, an open redirect through a tab character in redirect() paths, and cross-site scripting through meta refresh attributes. ws: memory exhaustion through unbounded automatic pong replies. npm audit now reports no vulnerabilities.
  • Stop-loss orders waiting for their trigger can be modified and cancelled (1573abdb0) - an SL or SL-M order whose trigger has not been touched is reported as "trigger pending" (the sandbox and several brokers; one spells it "trigger_pending"). The Order Book page offered Cancel and Modify for "open" orders alone, so in analyzer mode only LIMIT orders could be changed. Both spellings now count as working orders, with Cancel, Modify, Cancel All, the Open card and the filter, and a status without a style shows its own words instead of "open". The sandbox's Cancel All matched a status it never stores, so it reported success and left every stop-loss order working; it now cancels them.
  • The sandbox reports a stop order waiting for its trigger as open over the API (37a0b0cdc) - since 2.0.1.6 the sandbox's order book and order status endpoints returned "trigger pending" for such an order, a status a strategy never sees live on Zerodha, which reports "open". They report "open" again, and the order book statistics count it in total_open_orders and no longer carry total_trigger_pending_orders. The order-update stream still says "trigger pending", as documented, and no live broker changes.
  • No master contract download on a market-hours login (b6217a0d8, #2533) - a second device resuming the session after the 08:00 cutoff downloaded a contract already fetched that morning again, holding the single worker for about 45 seconds of market hours, and every later login rebuilt a symbol cache it already had. A login now keeps a cache that is loaded and ready; a download finished before the cutoff schedules one refresh at the cutoff, before the market opens, which downloads only if the broker is still logged in and the contract is still stale. A login that finds a contract from before the cutoff still downloads, because trading a day on a stale symbol list costs more than one slow minute.
  • Zerodha quotes carry the exchange's trade time (33ef372bf, #2143, #2534) - Kite's quote packet carries no time and no open interest, so a Quote subscriber's ltt was the server clock and its oi was missing. OpenAlgo Quote now subscribes Kite full mode; ltt is the last trade time in epoch milliseconds (for an index, the exchange time of its value), exchange_timestamp is in epoch milliseconds, and a packet without a time leaves both out instead of filling them from the server clock. Depth is published only when Depth is subscribed, and LTP messages fanned out from Quote and Depth carry ltt.

Dependencies

  • Frontend: react-router 8.3.0 to 8.5.3 (the range floor is now ^8.5.1), ws 8.21.0 to 8.23.1 (the override floor is now >=8.23.0), and @remix-run/route-pattern 0.22.1, which React Router 8.5 depends on.
  • React Doctor 0.9.23 runs through npx from npm run doctor; it is not installed as a dependency.
  • No Python dependency changed.

Contributors

  • @marketcalls - the React Doctor cleanup and its CI gate, the React Router and ws update, stop-loss orders in the order book and the sandbox, the master contract cutoff refresh (#2533), and the release.
  • @Kalaiviswa - Zerodha quotes with the exchange's trade time and Quote in full mode (#2143, #2534).

Links

Don't miss a new openalgo release

NewReleases is sending notifications on new releases.