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 #226

Merged
merged 1 commit into from May 18, 2023

Conversation

AngusP
Copy link
Collaborator

@AngusP AngusP commented May 17, 2023

the Mint API /mint?amount=<int> 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.

@codecov
Copy link

codecov bot commented May 18, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.04 ⚠️

Comparison is base (f0735cf) 55.38% compared to head (1e07c04) 55.35%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #226      +/-   ##
==========================================
- Coverage   55.38%   55.35%   -0.04%     
==========================================
  Files          41       41              
  Lines        3286     3288       +2     
==========================================
  Hits         1820     1820              
- Misses       1466     1468       +2     
Impacted Files Coverage Δ
cashu/mint/router.py 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@AngusP AngusP added enhancement New feature or request mint About the Nutshell mint labels May 18, 2023
@callebtc callebtc merged commit e25100c into cashubtc:main May 18, 2023
4 checks passed
@AngusP AngusP deleted the mint-request-input-checking-simple branch May 18, 2023 22:48
@AngusP AngusP restored the mint-request-input-checking-simple branch June 27, 2023 17:20
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