← Community
bugopen

Credential save crashes on Windows for module-scoped/namespaced provider ids (OSError: Invalid argument)

Muhammad Akif JanjuaMuhammad Akif Janjua#42h ago · 3 views
affected: station-v1.5.8

Reproduction steps:

  1. Install two modules whose credential_spec.provider values collide (or one

module colliding with a built-in catalog provider) on Windows.

  1. Go to Studio → Integrations → find the namespaced provider card

(e.g. "<module-slug>::<provider>").

  1. Click Manage → Add credential, fill in a label and the credential value,

click Save.

Expected: Credential saves successfully, card flips to "Configured."

Actual: Save fails with:
OSError: [Errno 22] Invalid argument: '...\receipts\credentials\<slug>::<provider>_cred_..._....json'

Root cause: studio_server.py, function _persist_credential_receipt (called by
POST /api/integration/credential). The receipt filename is built as:

fn = "cred_%s_%s_%s_%s_%04d.json" % (action, iid, cred_id, ts, _RECEIPT_SEQ[0])

iid is interpolated raw. When a module's provider collides with an existing
one, Station auto-namespaces it as "<module-slug>::<provider>". The "::" is
legal in a Unix filename but illegal on Windows (":" is reserved for drive
letters), so the file write throws OSError [Errno 22]. The save is aborted
entirely — no receipt, no vault write.

Suggested fix: sanitize filesystem-reserved characters (<>:"/\|?*) out of
iid only when constructing the receipt filename — leave iid untouched in
the receipt body, vault key, and everywhere else. One-line, backward-compatible
change, verified locally.

Impact: Blocks any Windows user from configuring credentials for a namespaced/
colliding-provider module through the UI at all — not specific to any one
module.

Module slug + version: muhammad-akif-janjua/notion-guard (dev build)

0 replies

Sign in to reply.