File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -649,11 +649,16 @@ func (g *LightningTerminal) ValidateMacaroon(ctx context.Context,
649649 return err
650650 }
651651
652- // If we're in integrated mode, we're using a super macaroon internally,
653- // which we can just pass straight to lnd for validation. But the user
654- // might still be using a specific macaroon, which should be handled the
655- // same as before.
656- if g .cfg .LndMode == ModeIntegrated && session .IsSuperMacaroon (macHex ) {
652+ // If we're using a super macaroon, we just make sure it is valid and
653+ // contains all the permissions needed. If we get to this point, we're
654+ // either in integrated lnd mode where this is the only macaroon
655+ // validation function, and we're done after the check. Or we're in
656+ // remote lnd mode but the request is for an in-process daemon which we
657+ // can validate here. Any request for a remote sub-daemon goes through
658+ // the proxy and its director and any super macaroon will be converted
659+ // to a daemon specific macaroon before directing the call to the remote
660+ // daemon. Those calls don't land here.
661+ if session .IsSuperMacaroon (macHex ) {
657662 macBytes , err := hex .DecodeString (macHex )
658663 if err != nil {
659664 return err
You can’t perform that action at this time.
0 commit comments