security: add is_authenticated check to /lnd-connect-info backend handler (AUTH-011)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
64abb494d5
commit
48dc4a6068
@ -180,8 +180,11 @@ impl ApiHandler {
|
|||||||
// Electrs status — unauthenticated (read-only sync status)
|
// Electrs status — unauthenticated (read-only sync status)
|
||||||
(Method::GET, "/electrs-status") => Self::handle_electrs_status().await,
|
(Method::GET, "/electrs-status") => Self::handle_electrs_status().await,
|
||||||
|
|
||||||
// LND connect info — unauthenticated (read-only, localhost only)
|
// LND connect info — requires authenticated session (exposes admin macaroon)
|
||||||
(Method::GET, "/lnd-connect-info") => {
|
(Method::GET, "/lnd-connect-info") => {
|
||||||
|
if !self.is_authenticated(&headers).await {
|
||||||
|
return Ok(Self::unauthorized());
|
||||||
|
}
|
||||||
Self::handle_lnd_connect_info(self.rpc_handler.clone()).await
|
Self::handle_lnd_connect_info(self.rpc_handler.clone()).await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user