more hardening
This commit is contained in:
parent
2fbc100da5
commit
ac69ae9846
3 changed files with 18 additions and 4 deletions
|
|
@ -144,4 +144,12 @@ def assert_valid_bolt11(invoice:str):
|
|||
if not ENABLE_HARDENING:
|
||||
return
|
||||
assert_printable(invoice)
|
||||
|
||||
|
||||
# Check if boolean
|
||||
def assert_boolean(v:bool):
|
||||
if not ENABLE_HARDENING:
|
||||
return
|
||||
if not isinstance(v, bool):
|
||||
panic("not a boolean")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue