Lnurlp/url_validation_fix (#883)

* dont assume field

* fix https check
This commit is contained in:
calle 2022-08-15 00:20:57 +02:00 committed by GitHub
parent befe96257d
commit 4ac73f1a79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,7 +96,7 @@ async def api_link_create_or_update(
data.min *= data.fiat_base_multiplier
data.max *= data.fiat_base_multiplier
if data.success_url is not None and data.success_url.startswith("https://"):
if data.success_url is not None and not data.success_url.startswith("https://"):
raise HTTPException(
detail="Success URL must be secure https://...",
status_code=HTTPStatus.BAD_REQUEST,