mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-24 14:51:05 +01:00
improved validation
This commit is contained in:
parent
45a69a1139
commit
0f417110cb
1 changed files with 5 additions and 0 deletions
|
@ -112,6 +112,11 @@ async def api_address_create(
|
||||||
status_code=HTTPStatus.NOT_FOUND, detail="Domain does not exist."
|
status_code=HTTPStatus.NOT_FOUND, detail="Domain does not exist."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if post_data.local_part == "_":
|
||||||
|
raise HTTPException(
|
||||||
|
status_code=HTTPStatus.NOT_FOUND, detail="You're sneaky, nice try."
|
||||||
|
)
|
||||||
|
|
||||||
exists = await get_address_by_local_part(domain_id, post_data.local_part)
|
exists = await get_address_by_local_part(domain_id, post_data.local_part)
|
||||||
|
|
||||||
if exists:
|
if exists:
|
||||||
|
|
Loading…
Add table
Reference in a new issue