{"record":{"id":"8df2f6056b5c0075","repo":"jdx/mise","slug":"bootstrap-user-name-field-must-not-contain","errorCode":null,"errorMessage":"bootstrap user '{name}' {field} must not contain ':', CR, or LF","messagePattern":"bootstrap user '(.+?)' (.+?) must not contain ':', CR, or LF","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/accounts.rs","lineNumber":734,"sourceCode":"        });\n    if !valid {\n        bail!(\n            \"invalid bootstrap {kind} name '{name}': use at most 32 ASCII letters, digits, '_' or '-', with an optional trailing '$'\"\n        );\n    }\n    Ok(())\n}\n\nfn validate_account_path(name: &str, field: &str, path: &std::path::Path) -> Result<()> {\n    if !path.is_absolute() {\n        bail!(\"bootstrap user '{name}' {field} must be an absolute path\");\n    }\n    if path\n        .to_string_lossy()\n        .chars()\n        .any(|character| character == ':' || character == '\\n' || character == '\\r')\n    {\n        bail!(\"bootstrap user '{name}' {field} must not contain ':', CR, or LF\");\n    }\n    Ok(())\n}\n\npub(crate) fn plans(requests: &AccountRequests) -> Vec<ResourcePlan> {\n    requests\n        .groups\n        .iter()\n        .map(GroupRequest::plan)\n        .chain(requests.users.iter().map(UserRequest::plan))\n        .collect()\n}\n\npub(crate) fn apply(requests: &AccountRequests, dry_run: bool, yes: bool) -> Result<bool> {\n    let mut actions = vec![];\n    let mut unknown = vec![];\n    for group in requests\n        .groups","sourceCodeStart":716,"sourceCodeEnd":752,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/accounts.rs#L716-L752","documentation":"Path fields for bootstrap users must not contain ':', CR, or LF. ':' is the field separator in /etc/passwd, and newlines would corrupt the line-oriented account database. mise validates the string form of the path and bails if any forbidden character is present.","triggerScenarios":"Setting a bootstrap user's home (or other validated path) to a value containing ':', '\\n', or '\\r' — e.g. a Windows-style 'C:\\\\Users' path or a templated value that expands with newlines.","commonSituations":"Porting configs from Windows with drive-letter paths; building paths via templates/env interpolation that capture multi-line values; accidental paste of multi-line content into a TOML string.","solutions":["Remove ':' from the path (use the POSIX mount path instead of a drive-letter form).","Trim/normalize any CR/LF from the value before it reaches the config.","Check template expansions for stray newlines and re-run `mise bootstrap plan`."],"exampleFix":"// before\n[[bootstrap.users]]\nname = \"alice\"\nhome = \"C:\\\\Users\\\\alice\"\n\n// after\n[[bootstrap.users]]\nname = \"alice\"\nhome = \"/home/alice\"","handlingStrategy":"validation","validationCode":"function validatePathChars(user, field) {\n  const p = user[field];\n  if (typeof p === 'string' && /[:\\r\\n]/.test(p)) {\n    throw new Error(`user '${user.name}': ${field} must not contain ':', CR, or LF`);\n  }\n}","typeGuard":"function isPasswdSafePath(p) {\n  return typeof p === 'string' && !/[:\\r\\n]/.test(p);\n}","tryCatchPattern":"try {\n  await mise.bootstrap.apply(config);\n} catch (e) {\n  if (String(e).includes('must not contain')) {\n    console.error('Strip :, CR, LF from the path value:', e.message);\n  } else throw e;\n}","preventionTips":["Use POSIX paths, never Windows drive-letter paths, for account fields.","Trim and normalize template/env expansions before embedding them in paths.","Ban multi-line strings in path fields via config linting."],"tags":["bootstrap","paths","input-validation"],"backgroundTag":"invalid-argument-format","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}