Skip to content
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

PatchWork AutoFix #5

Open
wants to merge 4 commits into
base: local-llama3-8b
Choose a base branch
from
Open

Conversation

CTY-git
Copy link

@CTY-git CTY-git commented May 2, 2024

This pull request from patched fixes 8 issues.


@patched-admin patched-admin force-pushed the autofix-local-llama3-8b branch 2 times, most recently from 26e3030 to 91ae062 Compare May 7, 2024 13:34
@patched-admin patched-admin force-pushed the autofix-local-llama3-8b branch from 91ae062 to 1ecc559 Compare May 7, 2024 22:46
Copy link

sonarqubecloud bot commented May 7, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
E Reliability Rating on New Code (required ≥ A)
D Security Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@@ -38,4 +36,5 @@
return User.from_raw(await cur.fetchone())

def check_password(self, password: str):
return self.pwd_hash == md5(password.encode('utf-8')).hexdigest()
salt = self.pwd_hash.split('$')[1]
return scrypt(password.encode('utf-8'), salt.encode('utf-8'), 8192).hexdigest() == self.pwd_hash.split('$')[2]

Check failure

Code scanning / SonarCloud

Password hashing functions should use an unpredictable salt High

Add an unpredictable salt value to this hash. See more on SonarCloud
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