prop/lib/microwaveprop
Graham McIntire 265669fc3a
Fix ADIF parser crash on records with multi-byte UTF-8 characters
Regex.scan with `return: :index` reports BYTE offsets, but String.slice/3
uses CHARACTER offsets. When a record contained a multi-byte UTF-8
character in an earlier field (e.g. "café" in NOTES), every subsequent
field's slice shifted one byte left, eventually landing on a literal
">" that crashed String.to_integer/1 with ArgumentError.

Switch to :binary.part/3 which is byte-based and matches what Regex.scan
reports. Also simplify the value offset calculation to use the scanned
tag_len directly instead of re-splitting the tag text. Reproduced in a
new regression test.

Prod stack trace: AdifImport.parse_fields/1 crashed on upload with
binary_to_integer(">") -- a FreeDV/N1MM logger that embedded UTF-8
characters in a NOTES field triggered it.
2026-04-12 15:13:59 -05:00
..
accounts Send mail as prop@w5isp.com with reply-to graham@mcintire.me 2026-04-12 14:00:38 -05:00
backtest Fix all 12 dialyzer warnings 2026-04-11 18:08:18 -05:00
beacon_monitors Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
beacons Add MRMS rain mosaic, fix beacons crash, fix UTC clock flash 2026-04-12 14:49:20 -05:00
commercial Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
propagation Add MRMS rain mosaic, fix beacons crash, fix UTC clock flash 2026-04-12 14:49:20 -05:00
radio Fix ADIF parser crash on records with multi-byte UTF-8 characters 2026-04-12 15:13:59 -05:00
terrain Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
weather Add MRMS rain mosaic, fix beacons crash, fix UTC clock flash 2026-04-12 14:49:20 -05:00
workers Add MRMS rain mosaic, fix beacons crash, fix UTC clock flash 2026-04-12 14:49:20 -05:00
accounts.ex Add /beacons CRUD and /users admin page 2026-04-08 12:01:45 -05:00
application.ex Add MRMS rain mosaic, fix beacons crash, fix UTC clock flash 2026-04-12 14:49:20 -05:00
backtest.ex Phase 9.3, 9.4, and Phase 3 NEXRAD pipeline 2026-04-10 12:48:36 -05:00
beacon_monitors.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
beacons.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
cache.ex Cache /contacts, fix map blink, make mode optional 2026-04-12 12:47:25 -05:00
commercial.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
geo.ex Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
mailer.ex Send mail as prop@w5isp.com with reply-to graham@mcintire.me 2026-04-12 14:00:38 -05:00
markdown.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
propagation.ex Nudge HRRR scores with live ASOS obs between runs 2026-04-12 14:27:27 -05:00
radio.ex Serve /contacts/map payload via HTTP endpoint, parallel hydrate 2026-04-12 13:10:51 -05:00
release.ex Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
repo.ex initial 2026-03-28 11:28:47 -05:00
repo_listener.ex Replace polling with Postgres LISTEN/NOTIFY for live updates 2026-04-02 16:26:22 -05:00
terrain.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
weather.ex Fix /weather 500 on cold cache, untrack k8s secret 2026-04-12 13:56:59 -05:00