Skip to content

Validate config inputs before building (DONATION integer, hostname) #8

@VijitSingh97

Description

@VijitSingh97

Problem

DONATION is read from config.json (rigforge.sh:107) and then sed'd into the XMRig source (donate.h, :235/:242) and --argjson'd into jq (:359) with no validation. A non-integer/garbage value breaks the build opaquely or risks injecting into source before compile. Other inputs (hostname) are also unvalidated.

Proposed

  • Validate DONATION is an integer within XMRig's allowed range (0–100) before patching/build; fail fast with a clear message.
  • Sanity-check P2POOL_NODE_HOSTNAME (non-empty, reasonable charset).

Acceptance

  • Invalid DONATION/hostname is rejected with a clear error before any source patch or build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    securitySecurity-sensitive issue or hardeningsetuprigforge.sh, config.json, first-run setup

    Type

    No fields configured for Task.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions