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

[_]: feature/Switch to argon2 #242

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

CandelR
Copy link
Contributor

@CandelR CandelR commented Dec 2, 2024

  • Compute Argon2 hash for all new users and update the hash after login for old ones.

Related Pull Requests

@CandelR CandelR added the enhancement New feature or request label Dec 2, 2024
@CandelR CandelR self-assigned this Dec 2, 2024
@CandelR CandelR changed the base branch from release-1.5.39 to release/1.6.0 December 9, 2024 07:03
Base automatically changed from release/1.6.0 to master December 24, 2024 10:31
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
15.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

import { constants } from '../../services/AppService';
import errorService from '../../services/ErrorService';
import AesUtils from '../aesUtils';

const password = constants.CRYPTO_SECRET || ''; // Force env var loading

/**
* Argon2id parameters taken from RFC9106 (variant for memory-constrained environments)
* * @constant

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think two ** here is a typo

@@ -56,32 +62,6 @@ export function decryptTextWithKey(encryptedText: string, keyToDecrypt: string):
}
}

export function probabilisticEncryption(content: string): string | null {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those functions are not used, right?

@@ -78,6 +78,7 @@
"expo-status-bar": "~1.11.1",
"expo-system-ui": "~2.9.4",
"expo-updates": "~0.24.13",
"hash-wasm": "^4.12.0",
Copy link

@TamaraFinogina TamaraFinogina Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasm works or do we need a kotlin lib?

let changedPasswordNewToken;
let changedPasswordToken;
if (!salt.startsWith('argon2id$')) {
const changePasswordResponse = await this.doChangePassword({ password: password, newPassword: password });

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here it works, right? I think for drive-web I had to copy-paste some steps only

@@ -75,7 +75,7 @@ class DriveLocalDB {
}

public async saveFolderContent(
folderRecordData: { id: number; parentId: number; name: string; updatedAt: string },
folderRecordData: { id: number; parentId: number; name: string; updatedAt: Date },

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is from sdk update, no?

@@ -4118,6 +4111,15 @@ axios@^0.27.2:
follow-redirects "^1.14.9"
form-data "^4.0.0"

axios@^0.28.0:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we update it?

@@ -13167,6 +13179,11 @@ [email protected]:
resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==

uuid@^11.0.2:
version "11.0.3"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we update it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants