remove Base64Str type from altcha
This was decoding the string, which the altcha validator expects to do itself. Now it works.
This commit is contained in:
@@ -17,7 +17,7 @@ from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from pydantic import AfterValidator, Base64Str
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
|
||||
from sqlalchemy import create_engine
|
||||
|
||||
@@ -29,7 +29,7 @@ import jwt
|
||||
|
||||
from uuid import uuid4
|
||||
|
||||
|
||||
from slopserver.settings import settings
|
||||
from slopserver.models import Domain, Path, User
|
||||
from slopserver.models import SlopReport, SignupForm, altcha_validator
|
||||
from slopserver.db import select_slop, insert_slop, get_user, create_user
|
||||
@@ -38,13 +38,6 @@ app = FastAPI()
|
||||
|
||||
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
|
||||
|
||||
class ServerSettings(BaseSettings):
|
||||
db_url: str = "sqlite+pysqlite:///test_db.sqlite"
|
||||
token_secret: str = "5bcc778a96b090c3ac1d587bb694a060eaf7bdb5832365f91d5078faf1fff210"
|
||||
altcha_secret: str = "0460de065912d0292df1e7422a5ed2dc362ed56d6bab64fe50b89957463061f3"
|
||||
|
||||
settings = ServerSettings()
|
||||
|
||||
|
||||
DB_ENGINE = create_engine(settings.db_url)
|
||||
TOKEN_SECRET = settings.token_secret
|
||||
|
||||
Reference in New Issue
Block a user