Skip to content

feat(http): honor continue_on_error/include_sql/format on all HTTP paths#39

Merged
0xeb merged 1 commit into
mainfrom
feat/cli-http-executor-converge
Jun 23, 2026
Merged

feat(http): honor continue_on_error/include_sql/format on all HTTP paths#39
0xeb merged 1 commit into
mainfrom
feat/cli-http-executor-converge

Conversation

@0xeb

@0xeb 0xeb commented Jun 23, 2026

Copy link
Copy Markdown
Member

Pins libxsql v1.0.8 (statement_executor) and routes idasql's HTTP execution through libxsql's run_script + option parsing + formatters.

What was broken

?continue_on_error=1 / ?include_sql=1 were documented but no-ops — neither the --http server nor the REPL .http server parsed them (both ran with default ScriptOptions).

Change

  • REPL .http (IDAHTTPServer): new start() overload sets the thinclient statement_executor (+ auth); the callback now executes a single statement, and the thinclient owns multi-statement orchestration, options, and formatting.
  • --http (run_http_mode, hand-rolled main-thread queue): parse continue_on_error/include_sql/format from the query string, thread them through the queued command, and render via script_result_to_{json,text,csv,tsv}.
  • Plugin: unchanged — keeps the legacy whole-script execute_sync path (proven IDA main-thread marshaling; untestable here, so deliberately left alone).

Tested live (--http, against a Mach-O via idalib)

auth 401 without token; ?continue_on_error=1 runs statement 2 after an error; default fail-fast skips it; ?format=csv returns CSV + text/csv.

Note

Behavior is now unified on libxsql's run_script+formatters across paths. The --http httplib skeleton (routes/queue) is still hand-rolled; a full structural swap to IDAHTTPServer is a possible follow-up (pure dedup, no behavior change).

Pin libxsql v1.0.7 -> v1.0.8 (statement_executor + json_to_script_result).

- REPL .http (IDAHTTPServer): add an executor start() overload that sets the
  thinclient's statement_executor (with auth_token); the .http callback now runs
  one statement and the thinclient owns run_script + option parsing + formatting.
  Plugin keeps the legacy string query_fn (whole-script execute_sync), so its
  proven IDA-main-thread marshaling is untouched.
- --http (run_http_mode, hand-rolled queue): parse continue_on_error/include_sql/
  format from the query string, thread them through the main-thread command, and
  render via xsql::script_result_to_{json,text,csv,tsv}.

Fixes the previously no-op documented ?continue_on_error=1 / ?include_sql=1 and
adds ?format=text|csv|tsv on --http. Behavior is unified on libxsql's run_script
+ formatters; the --http httplib skeleton remains (full IDAHTTPServer swap TBD).
@0xeb
0xeb merged commit 669e82c into main Jun 23, 2026
6 checks passed
@0xeb
0xeb deleted the feat/cli-http-executor-converge branch June 23, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant