2 Commits

Author SHA1 Message Date
dependabot[bot]
0465d0a1cd Bump cryptography from 46.0.3 to 46.0.5
Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.3 to 46.0.5.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/46.0.3...46.0.5)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 46.0.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-11 02:41:14 +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

@@ -7,7 +7,7 @@ argon2-cffi-bindings==25.1.0
certifi==2025.10.5 certifi==2025.10.5
cffi==2.0.0 cffi==2.0.0
click==8.3.0 click==8.3.0
cryptography==46.0.3 cryptography==46.0.5
dnspython==2.8.0 dnspython==2.8.0
email-validator==2.3.0 email-validator==2.3.0
fastapi==0.119.0 fastapi==0.119.0

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()