Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mint API: Check ?amount is within a sensible range using FastAPI quer… #227

Closed
wants to merge 2 commits into from

Conversation

AngusP
Copy link
Collaborator

@AngusP AngusP commented May 17, 2023

Variant of #226, but using FastAPI's own validation to do the check... catch is that this would require an update to the FastAPI version >= 0.95.0 (per the docs for Query) -- related #178

The Mint API /mint?amount= currently doesn't do any input validation to check that the amount is positive or a possible amount of sats (21 Quadrillion) leading to some errors downstream -- depending on the number, the DB will reject the insert query because the amount is over the maximum INTEGER or LNBits/Lightning Node will also reject it.

@AngusP AngusP changed the title Mint API: Check ?amount is within a sensible range using FastAPI quer… Mint API: Check ?amount is within a sensible range using FastAPI quer… May 17, 2023
@AngusP AngusP added enhancement New feature or request mint About the Nutshell mint labels May 18, 2023
@callebtc callebtc closed this Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mint About the Nutshell mint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants