-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove CVE-2023-46809 revert config (#683)
revert #650 run test on Node.js 22 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated Node.js version support to 18, 20, and 22. - Removed unnecessary configuration from the release workflow. - Cleaned up outdated security-related entries in the package configuration. - Updated encryption functions in CryptoUtil.ts for improved security. - Refactored import statements for ES module syntax in webauthController.test.ts. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
ade9305
commit ff00e42
Showing
6 changed files
with
45 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,3 @@ jobs: | |
secrets: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GIT_TOKEN: ${{ secrets.GIT_TOKEN }} | ||
with: | ||
checkTest: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { strict as assert } from 'node:assert'; | ||
import { genRSAKeys, encryptRSA, decryptRSA } from '../../app/common/CryptoUtil'; | ||
|
||
describe('test/common/CryptoUtil.test.ts', () => { | ||
describe('genRSAKeys()', () => { | ||
it('should work', () => { | ||
const keys = genRSAKeys(); | ||
assert(keys.publicKey); | ||
assert(keys.privateKey); | ||
}); | ||
}); | ||
|
||
describe('encryptRSA(), decryptRSA()', () => { | ||
it('should work', () => { | ||
const keys = genRSAKeys(); | ||
// const plainText = 'hello world 中文😄'; | ||
const plainText = 'hello world 中文'; | ||
const encryptText = encryptRSA(keys.publicKey, plainText); | ||
assert.equal(decryptRSA(keys.privateKey, encryptText), plainText); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters