Skip to content

Conversation

@patched-codes
Copy link

@patched-codes patched-codes bot commented May 4, 2024

This pull request from patched fixes 4 issues.


  • File changed: sqli/dao/student.py
    Refactor SQL query parameters from dictionary to list The diff changes the way SQL query parameters are handled. Previously, a dictionary was used to store parameters, which were then inserted into the query string using named placeholders. The diff changes this to use a list of parameters and positional placeholders. This change affects both the LIMIT and OFFSET clauses of a SELECT query and the VALUES clause of an INSERT query.

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 4, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud


def check_password(self, password: str):
return self.pwd_hash == md5(password.encode('utf-8')).hexdigest()
return self.pwd_hash == sha256(password.encode('utf-8')).hexdigest()

Check failure

Code scanning / CodeQL

Use of a broken or weak cryptographic hashing algorithm on sensitive data

[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant