Skip to content

Conversation

@iamh2o
Copy link
Contributor

@iamh2o iamh2o commented Feb 7, 2026

Reject any ip_stub / ip-stub parameter ending with . at all 6 entry points:

  • zebra_day.__init__.scan()ValueError
  • zday bootstrap --ip-stub → error + exit 1
  • zday printer scan --ip-stub → error + exit 1
  • GET /config/scan → HTTP 400
  • GET /config/scan/stream → HTTP 400
  • print_mgr.probe_zebra_printers_add_to_printers_json() (already existed)

Also fixed test mock: was mocking subprocess.Popen but scan uses http.client — caused infinite hang.

317 tests passing.


Pull Request opened by Augment Code with guidance from the PR author

- Add ValueError in zebra_day.__init__.scan()
- Add CLI error+exit(1) in bootstrap and printer scan commands
- Add HTTP 400 in web scan routes (scan + scan/stream)
- Core print_mgr already had validation; now all 6 entry points covered
- Fix test mock: use http.client instead of subprocess.Popen
- 13 new tests (317 total passing)
@iamh2o iamh2o merged commit 7ac0834 into main Feb 7, 2026
2 of 11 checks passed
@iamh2o iamh2o deleted the feature/ip-stub-trailing-dot-validation branch February 7, 2026 11:52
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