Page MenuHomePhabricator

[web-db] add unit tests for worker crypto utils
ClosedPublic

Authored by kamil on Mar 20 2023, 9:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 6, 1:09 PM
Unknown Object (File)
Wed, Apr 3, 8:28 AM
Unknown Object (File)
Wed, Apr 3, 8:28 AM
Unknown Object (File)
Wed, Apr 3, 8:28 AM
Unknown Object (File)
Wed, Apr 3, 8:28 AM
Unknown Object (File)
Wed, Apr 3, 8:27 AM
Unknown Object (File)
Wed, Apr 3, 8:19 AM
Unknown Object (File)
Thu, Mar 28, 5:44 AM
Subscribers

Details

Summary

Adding tests for crypto functions used to decrypt, encrypt, and initialize database.

Depends on D6996

Test Plan

Run tests

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.

add blank line after // @flow

kamil published this revision for review.Mar 20 2023, 9:26 AM
This revision is now accepted and ready to land.Mar 21 2023, 4:33 AM
web/database/utils/worker-crypto-utlis.test.js
18 ↗(On Diff #23873)

Is there any tag function we can use for SQLite?

web/database/utils/worker-crypto-utlis.test.js
18 ↗(On Diff #23873)

I didn't find anything worth using... I created follow-up task to take a look again: ENG-3370.

Right now I would prefer to proceed with this and use prepared statements like in D7122, is it okay for now?

web/database/utils/worker-crypto-utlis.test.js
18 ↗(On Diff #23873)

Thanks for creating the task!! Prepared statements look safe against SQL injection attacks, so I think this is a good approach :)

FYI By mistake, two diffs had different order in the stack than in my branch on git - that's why I needed to fix parent/child revisions because arcanist didn't allow me to arc diff but this has no influence on the code itself