ffpass icon indicating copy to clipboard operation
ffpass copied to clipboard

Skip duplicates & add --overwrite

Open moqmar opened this issue 2 years ago β€’ 1 comments

This change handles imports of existing entries correctly and thus solves #36: if the entry is the same (hostname, username and password), it gets skipped. If the password is different (but an entry with the same hostname & username already exists), a warning is issued, unless --overwrite is specified, in which case the entry gets overwritten.

During usual Firefox UI workflow, it's not possible to create an entry with ## in the hostname, which is the reason why I used that as the delimiter. Note that it is possible in Firefox's password manager UI to create two entries with the same username but different passwords, in which case only one of them will get overwritten.

moqmar avatar Nov 09 '21 15:11 moqmar

Unit Test Results

βŸβ€„1 files  Β±0β€‚β€ƒβŸβ€„1 suites  Β±0   0s :stopwatch: Β±0s 10 tests Β±0  10 :heavy_check_mark: Β±0  0 :zzz: Β±0  0 :x: Β±0 

Results for commit 8f828557. ± Comparison against base commit 12d6fbae.

github-actions[bot] avatar Nov 09 '21 15:11 github-actions[bot]