diff --git a/compose.yaml b/compose.yaml index 61f7ff3..545866e 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,6 +1,6 @@ services: vunerable-web-app: - image: web-app:v0.0.1a + image: kulesh_web-app:v0.0.1a ports: - "80:8000" volumes: diff --git a/cookies.txt b/cookies.txt new file mode 100644 index 0000000..1510d80 --- /dev/null +++ b/cookies.txt @@ -0,0 +1,6 @@ +# Netscape HTTP Cookie File +# https://curl.se/docs/http-cookies.html +# This file was generated by libcurl! Edit at your own risk. + +localhost FALSE / FALSE 0 password a +localhost FALSE / FALSE 0 login "' or 1=1-- " diff --git a/src/app.py b/src/app.py index b90bd1e..f0fd7a7 100644 --- a/src/app.py +++ b/src/app.py @@ -125,7 +125,7 @@ async def welcome(request: Request): if not login or not password: return RedirectResponse(url="/login") cursor.execute( - f"SELECT * FROM users WHERE login='{login}' AND password='{password}'" + f"SELECT login FROM users WHERE login='{login}' AND password='{password}'" ) user = cursor.fetchall() if user: @@ -133,7 +133,7 @@ async def welcome(request: Request):