mirror of
https://github.com/getAlby/hub.git
synced 2026-08-13 12:33:39 +02:00
The setup API accepts file paths for the LND certificate and macaroon and for the CLN lightning directory. Previously the raw file contents were read and stored without any validation. Validate these inputs before persisting them: - LND cert: parse the PEM and store only the re-encoded certificate(s), discarding any other PEM blocks (e.g. a bundled private key). - LND macaroon: unmarshal and store the re-marshalled macaroon. - CLN lightning directory: verify it contains the TLS credentials (ca.pem, client.pem, client-key.pem) that CLN loads at connect time, including the hold subdirectory when configured. On failure, return a generic error to the client and log the detail server-side. File paths remain supported for Umbrel-style installs. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api.go | ||
| api_test.go | ||
| apps_test.go | ||
| backup.go | ||
| backup_test.go | ||
| esplora.go | ||
| lsp.go | ||
| models.go | ||
| rebalance.go | ||
| setup_test.go | ||
| transactions.go | ||
| transactions_test.go | ||