Skip to content

fix: audit findings (2026-11-11, round 4) - #35

Merged
franciscbalint merged 1 commit into
developfrom
fix/audit4-2026-11-11
Nov 12, 2026
Merged

franciscbalint merged 1 commit into
developfrom
fix/audit4-2026-11-11

Conversation

@franciscbalint

Copy link
Copy Markdown
Collaborator

Fourth audit (2026-11-11) fixes.

  • High: a body cut short after its 200 header was returned as success on every path (getfile, JSON calls, Warmup) because Net::HTTP's ignore_eof defaults to true. It now raises ApiResponseError with status 0 and no key.
  • High (regression since 2.0.1): validate_file_send_stream and scoring_file_send_stream always raised ArgumentError: File path must be under the current directory: they wrote a Tempfile in the system temp dir and the safe-path check (added in 2.0.1) rejected it. The content is now uploaded from memory under the caller's file_name via an internal BaseRequest::Upload; paths passed by callers are checked exactly as before (/etc/passwd, ../outside.csv still rejected). Affected 2.0.1–3.0.1; 2.0.0 was not.
  • Medium: Warmup CSV downloads returned an HTML 200 page as CSV; they now raise, like Python.
  • Tests: sweeps over every request path for refused redirects (301/302/303/307/308 with Location, real loopback server), timeouts (Ruby had none), and getfile HTML bodies; Inbox Placement delete with an empty 2xx returns nil (spec).

rspec 549 examples (was 302) pass on Ruby 3.0, 3.4 and 4.0; RuboCop clean.

@franciscbalint
franciscbalint merged commit 491e77b into develop Nov 12, 2026
9 checks passed
@franciscbalint
franciscbalint deleted the fix/audit4-2026-11-11 branch November 12, 2026 09:28
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