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
F1432829: D7104.diff
Thu, Mar 28, 5:44 AM
Unknown Object (File)
Fri, Mar 8, 1:35 AM
Unknown Object (File)
Fri, Mar 8, 1:35 AM
Unknown Object (File)
Fri, Mar 8, 1:35 AM
Unknown Object (File)
Thu, Mar 7, 9:00 PM
Unknown Object (File)
Thu, Mar 7, 4:00 AM
Unknown Object (File)
Thu, Mar 7, 4:00 AM
Unknown Object (File)
Feb 21 2024, 7:17 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
Branch
db-on-web-5
Lint
No Lint Coverage
Unit
No Test Coverage

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

Is there any tag function we can use for SQLite?

web/database/utils/worker-crypto-utlis.test.js
18

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

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