-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add login endpoint #2
base: main
Are you sure you want to change the base?
Conversation
Mayhem for API Automated API Testing Report❗ 3 Errors Found
✔️ 🎆 0 Warnings FoundTesting details and issue reproduction found at https://app.mayhem.security/forallsecure-demo/mapi-action-examples/fastapi/276 |
@app.get("/login") | ||
async def login(email: str, password: str): | ||
cur = con.cursor() | ||
cur.execute("SELECT * FROM users WHERE email = '%s' and password = '%s'" % (email, password)) |
Check failure
Code scanning / mAPI
Internal Server Error (sqlite3.Warning) Error
@app.get("/login") | ||
async def login(email: str, password: str): | ||
cur = con.cursor() | ||
cur.execute("SELECT * FROM users WHERE email = '%s' and password = '%s'" % (email, password)) |
Check failure
Code scanning / mAPI
Internal Server Error (ValueError) Error
@app.get("/login") | ||
async def login(email: str, password: str): | ||
cur = con.cursor() | ||
cur.execute("SELECT * FROM users WHERE email = '%s' and password = '%s'" % (email, password)) |
Check failure
Code scanning / mAPI
Internal Server Error (sqlite3.OperationalError) Error
@app.get("/login") | ||
async def login(email: str, password: str): | ||
cur = con.cursor() | ||
cur.execute("SELECT * FROM users WHERE email = '%s' and password = '%s'" % (email, password)) |
Check failure
Code scanning / mAPI
Internal Server Error (sqlite3.OperationalError) Error
@app.get("/login") | ||
async def login(email: str, password: str): | ||
cur = con.cursor() | ||
cur.execute("SELECT * FROM users WHERE email = '%s' and password = '%s'" % (email, password)) |
Check failure
Code scanning / mAPI
Internal Server Error (ValueError) Error
@app.get("/login") | ||
async def login(email: str, password: str): | ||
cur = con.cursor() | ||
cur.execute("SELECT * FROM users WHERE email = '%s' and password = '%s'" % (email, password)) |
Check failure
Code scanning / mAPI
Internal Server Error (sqlite3.Warning) Error
bb780ed
to
69a1cdc
Compare
d89ff4a
to
13afeba
Compare
0c8cfbb
to
f9014dd
Compare
863be11
to
b3f647d
Compare
44168ec
to
c7ad466
Compare
dd2fb53
to
c7ad466
Compare
c7ad466
to
cd4a8e2
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2 +/- ##
==========================================
- Coverage 69.23% 59.52% -9.71%
==========================================
Files 2 2
Lines 26 42 +16
==========================================
+ Hits 18 25 +7
- Misses 8 17 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This PR introduces a SQL Injection and a Path Traversal in new login, logout and attachments endpoints, which Mayhem for API detects, preventing the PR from being merged.