feat(http): honor continue_on_error/include_sql/format on all HTTP paths#39
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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=1were documented but no-ops — neither the--httpserver nor the REPL.httpserver parsed them (both ran with defaultScriptOptions).Change
.http(IDAHTTPServer): newstart()overload sets the thinclientstatement_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): parsecontinue_on_error/include_sql/formatfrom the query string, thread them through the queued command, and render viascript_result_to_{json,text,csv,tsv}.execute_syncpath (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=1runs statement 2 after an error; default fail-fast skips it;?format=csvreturns CSV +text/csv.Note
Behavior is now unified on libxsql's
run_script+formatters across paths. The--httphttplib skeleton (routes/queue) is still hand-rolled; a full structural swap toIDAHTTPServeris a possible follow-up (pure dedup, no behavior change).