Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
    npro  
 Modern all-safe Rust Network Protocol library supporting h1, h2, h3, ws, wt sans-IO and with socket IO + tls
git clone https://npro.rs/repo/npro
 
root / assets / arch-aarch64BE-bcm2837-a53.svg
Author[]Andy Green <andy@warmcat.com> 2026-09-30 21:05 UTC
Committer[]Andy Green <andy@warmcat.com> 2026-10-04 04:09 UTC
Treed59b8f4d8f12896ca85b547bafe315dc1171a9aa   Raw Patch
 
server: ignore builder platforms that have no name
server: ignore builder platforms that have no name

A builder that sent a platform without "name" or "platform", eg, one that
misread its own conf, crashed sai-server: the platform upsert
dereferences both as strings.  Skip such platforms, like the ones with
unsafe names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
diff --git a/src/server/s-ws-builder.c b/src/server/s-ws-builder.c index bb0de25..f3b8ded 100644 --- a/src/server/s-ws-builder.c +++ b/src/server/s-ws-builder.c @@ -1002,6 +1002,17 @@ sais_ws_json_rx_builder(struct vhd *vhd, struct pss *pss, uint8_t *buf, size_t b esc_pcon[192], esc_sai_hash[192], esc_lws_hash[192], esc_peer_ip[96]; + /* + * A platform the builder couldn't name (eg, + * from a conf it misread) is no use to us, + * and everything below needs the names + */ + if (!build->name || !build->platform) { + lwsl_notice("%s: ignoring builder plat " + "with no name\n", __func__); + continue; + } + if (sai_str_has_shell_metachars(build->name) || sai_str_has_shell_metachars(build->platform) || (build->pcon &&
Page fetched 0s ago, creation time: 2ms (vhost etag hits: 0%, cache hits: 0%)