Skip to content

fix: audit findings (2026-11-12, round 5) - #36

Merged
franciscbalint merged 1 commit into
masterfrom
fix/audit5-2026-11-12
Nov 12, 2026
Merged

franciscbalint merged 1 commit into
masterfrom
fix/audit5-2026-11-12

Conversation

@franciscbalint

Copy link
Copy Markdown
Collaborator

Fixes from the fifth audit (Medium).

  • Warmup errors on a 200 carry the status. An HTML page, invalid JSON, or a JSON body on a CSV download raised ZBApiException with status_code=None; it is now 200, matching the core client (and what the Ruby and PHP changelogs already say about Python).
  • Cut-off response test. No test sent a body shorter than its Content-Length; truncation was caught only by urllib3's enforce_content_length, and turning that off left the suite green while downloads saved truncated files. CutShortBodySweepTest runs a loopback socket fake over every client and Warmup method (downloads streamed and not), for a short Content-Length and a chunked body missing its last chunk, and asserts an exception, no key in the message and no file left. With enforce_content_length=False it now fails.
  • Warmup ignore_conflict is strict. "false" and "junk" were sent as True; Warmup now reuses the client's _strict_bool.

Tests 158 → 161; ruff, compileall and the wheel build pass; also run on Python 3.10.

@franciscbalint
franciscbalint merged commit 4cbcc3d into master Nov 12, 2026
9 checks passed
@franciscbalint
franciscbalint deleted the fix/audit5-2026-11-12 branch November 12, 2026 11:08
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