Web ops: cast appid, workunitid and nsecs to int in db_ops.inc
admin_show_result_summary() in html/inc/db_ops.inc appended the raw appid and workunitid GET parameters to its SQL query without quoting, and used nsecs in arithmetic. A crafted value such as appid=1 or sleep(5) was executed as part of the query. The page requires an admin login, so this is a hardening fix.
The three values are now cast to int where they are read, including the second use of nsecs in SqlQueryString.
AI assistance
Found and written with Claude Code (claude-sonnet-5-5). I reviewed the change.
Testing
php -l reports no syntax errors. Checked by reading the code that the three values only reach the query through these assignments.
Summary by cubic
Hardens html/inc/db_ops.inc against SQL injection by casting appid, workunitid, and nsecs to int before they reach the query. Previously, these GET parameters were used raw—a crafted value like appid=1 or sleep(5) executed as part of the SQL statement.
- Casts
appidandworkunitidto int where they are read, andnsecsin bothadmin_show_result_summary()andSqlQueryString. - The page requires admin login, so this is a hardening fix rather than exposure to ordinary users.