2 Commits

Author SHA1 Message Date
dependabot[bot]
d7de359b34 Bump urllib3 from 2.5.0 to 2.6.3
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.5.0 to 2.6.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.5.0...2.6.3)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.6.3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-08 06:22:48 +00:00
Jack Case
a36b6e9865 actually send the email 2025-11-15 16:04:45 +00:00
3 changed files with 7 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ starlette==0.48.0
typer==0.19.2 typer==0.19.2
typing-inspection==0.4.2 typing-inspection==0.4.2
typing_extensions==4.15.0 typing_extensions==4.15.0
urllib3==2.5.0 urllib3==2.6.3
uvicorn==0.37.0 uvicorn==0.37.0
uvloop==0.22.1 uvloop==0.22.1
watchfiles==1.1.1 watchfiles==1.1.1

View File

@@ -34,6 +34,7 @@ from slopserver.settings import settings
from slopserver.models import Domain, Path, User from slopserver.models import Domain, Path, User
from slopserver.models import SlopReport, SignupForm, altcha_validator from slopserver.models import SlopReport, SignupForm, altcha_validator
from slopserver.db import select_slop, insert_slop, get_user, create_user, verify_user_email from slopserver.db import select_slop, insert_slop, get_user, create_user, verify_user_email
from slopserver.email import generate_verification_email, send_email
app = FastAPI() app = FastAPI()
@@ -150,9 +151,10 @@ def signup_form(form_data: Annotated[SignupForm, Form()]):
# send verification email # send verification email
# create a jwt encoding the username and a time limit to be the verification URL # create a jwt encoding the username and a time limit to be the verification URL
token = generate_verification_token(form_data.email) token = generate_verification_token(form_data.email)
return token
email_html = generate_verification_email(settings.api_base + "verify/?token=" + token)
status = send_email(form_data.email, "Slop Farmer Email Verification", email_html)
return status
@app.get("/verify") @app.get("/verify")
def verify_email(token: Annotated[str, AfterValidator(verify_verification_token)]): def verify_email(token: Annotated[str, AfterValidator(verify_verification_token)]):

View File

@@ -8,5 +8,6 @@ class ServerSettings(BaseSettings):
resend_token: str = "re_NXpjzbqR_KgAbu72PKjYHcquX24WvnN3i" resend_token: str = "re_NXpjzbqR_KgAbu72PKjYHcquX24WvnN3i"
sender_email: str = "slopfarmer@jack-case.pro" sender_email: str = "slopfarmer@jack-case.pro"
api_base: str = "api.slopfarmer.jack-case.pro/"
settings = ServerSettings() settings = ServerSettings()