Repository navigation
resolved security issue alerted by Dependabot - #18
Conversation
| @@ -1,10 +1,13 @@ | |||
| # app/auth.py | |||
|
|
|||
| import os, requests | |||
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Multiple imports on one line (os, requests) Warning
| idToken=response_data["idToken"], | ||
| ) | ||
| else: | ||
| error_msg = response_data.get("error", {}).get("message", "Login failed") |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Line too long (113/100) Warning
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Unnecessary "else" after "return" Warning
| idToken=response_data["idToken"], | ||
| ) | ||
| else: | ||
| error_msg = response_data.get("error", {}).get("message", "Login failed") |
Check notice
Code scanning / Pylintpython3 (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 Note
| ) | ||
| else: | ||
| error_msg = response_data.get("error", {}).get("message", "Login failed") | ||
| return _create_response(status.HTTP_401_UNAUTHORIZED, error_msg) |
Check notice
Code scanning / Pylintpython3 (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 Note
| return _create_response(status.HTTP_401_UNAUTHORIZED, str(e)) | ||
| return _create_response(status.HTTP_500_INTERNAL_SERVER_ERROR, str(e)) | ||
|
|
||
| async def verify_staff_access(token: str): |
Check notice
Code scanning / Pylintpython3 (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 Note
Check notice
Code scanning / Pylintpython3 (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 Note
Check notice
Code scanning / Pylintpython3 (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 Note
Check notice
Code scanning / Pylintpython3 (reported by Codacy)
Bad indentation. Found 6 spaces, expected 12 Note
Check notice
Code scanning / Pylintpython3 (reported by Codacy)
Bad indentation. Found 6 spaces, expected 12 Note
| @@ -1,10 +1,13 @@ | |||
| # app/auth.py | |||
|
|
|||
| import os, requests | |||
Check warning
Code scanning / Prospector (reported by Codacy)
Multiple imports on one line (os, requests) (multiple-imports) Warning
| @@ -1,10 +1,13 @@ | |||
| # app/auth.py | |||
|
|
|||
| import os, requests | |||
Check warning
Code scanning / Prospector (reported by Codacy)
Unable to import 'requests' (import-error) Warning
| else: | ||
| error_msg = response_data.get("error", {}).get("message", "Login failed") | ||
| return _create_response(status.HTTP_401_UNAUTHORIZED, error_msg) | ||
|
|
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning
| error_msg = response_data.get("error", {}).get("message", "Login failed") | ||
| return _create_response(status.HTTP_401_UNAUTHORIZED, error_msg) | ||
|
|
||
| except Exception as e: |
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning
| return _create_response(status.HTTP_500_INTERNAL_SERVER_ERROR, str(e)) | ||
|
|
||
| async def verify_staff_access(token: str): | ||
| try: |
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning
Check warning
Code scanning / Prospector (reported by Codacy)
Unnecessary "else" after "return" (no-else-return) Warning
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 (bad-indentation) Warning
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 6 spaces, expected 12 (bad-indentation) Warning
Check warning
Code scanning / Prospector (reported by Codacy)
Bad indentation. Found 6 spaces, expected 12 (bad-indentation) Warning
| @@ -1,10 +1,13 @@ | |||
| # app/auth.py | |||
|
|
|||
| import os, requests | |||
Check warning
Code scanning / Pylint (reported by Codacy)
Multiple imports on one line (os, requests) Warning
| else: | ||
| error_msg = response_data.get("error", {}).get("message", "Login failed") | ||
| return _create_response(status.HTTP_401_UNAUTHORIZED, error_msg) | ||
|
|
Check warning
Code scanning / Pylint (reported by Codacy)
Wrong hanging indentation (add 2 spaces). Warning
| else: | ||
| error_msg = response_data.get("error", {}).get("message", "Login failed") | ||
| return _create_response(status.HTTP_401_UNAUTHORIZED, error_msg) | ||
|
|
Check warning
Code scanning / Pylint (reported by Codacy)
Line too long (113/100) Warning
Check warning
Code scanning / Pylint (reported by Codacy)
Wrong hanging indentation (add 2 spaces). Warning
| return _create_response(status.HTTP_401_UNAUTHORIZED, error_msg) | ||
|
|
||
| except Exception as e: | ||
| return _create_response(status.HTTP_401_UNAUTHORIZED, str(e)) |
Check warning
Code scanning / Pylint (reported by Codacy)
Wrong hanging indentation (add 2 spaces). Warning
Check notice
Code scanning / Pylint (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 Note
Check notice
Code scanning / Pylint (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 Note
| return _create_response(status.HTTP_500_INTERNAL_SERVER_ERROR, str(e)) | ||
|
|
||
| async def verify_staff_access(token: str): | ||
| try: |
Check notice
Code scanning / Pylint (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 Note
| error_msg = response_data.get("error", {}).get("message", "Login failed") | ||
| return _create_response(status.HTTP_401_UNAUTHORIZED, error_msg) | ||
|
|
||
| except Exception as e: |
Check notice
Code scanning / Pylint (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 Note
| else: | ||
| error_msg = response_data.get("error", {}).get("message", "Login failed") | ||
| return _create_response(status.HTTP_401_UNAUTHORIZED, error_msg) | ||
|
|
Check notice
Code scanning / Pylint (reported by Codacy)
Bad indentation. Found 4 spaces, expected 8 Note
No description provided.