macaroons: reject unknown macaroon versions

We've only ever made macaroons with the v2 versions, so we should
explicitly reject those that aren't actually v2. We add a basic test
along the way, and also add a similar check for the version encoded in
the macaroon ID.
This commit is contained in:
Olaoluwa Osuntokun committed 2023-10-31 13:23:50 -07:00
1 parent c382268201
commit 9287b755d8
5 files changed
+110 -2

No files matched your search

@@ -26,6 +26,8 @@
* A bug that would cause taproot channels to sometimes not display as active
[has been fixed](https://github.com/lightningnetwork/lnd/pull/8104).
* [`lnd` will now properly reject macaroons with unknown versions.](https://github.com/lightningnetwork/lnd/pull/8132)
# New Features
## Functional Enhancements