Fix: Apply security hardening to WebUI and WebServer backend - #91
Conversation
|
Thanks for the contribution — the C++ fixes in particular are tight and address real issues. A few things from a deeper review: Whitelists vs
Other items
C++ fixes all look correct:
Approving once the test plan is filled in. |
- PHP: Implement strict whitelist for $sort parameter to prevent reflected XSS (dload, servers, shared). - C++: Add null pointer checks in Send_DownloadEd2k_Cmd and CStatsCollection::ReQuery to prevent crashes on EC failure. - C++: Clamp stats data count to multiple of 4 to prevent Out-of-Bounds read. - C++: Fix memory leak in ReQuery by ensuring delete response is called on all paths. - C++: Fix potential heap buffer overflow in Gzip compression by using zlib's documented worst-case size formula.
…telist The whitelist listed 'scrcount', but the column header link and the my_cmp() switch both use 'srccount', so sorting by Sources was silently rejected.
c2d8f6d to
12d3966
Compare
|
@peyoker thank you. I tested it and it's good. I made a small fix before merging. |
Summary
Test plan