mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-12-04 05:43:27 +01:00
refactor: pass secrets as values, fetched once per scope (#713)
* refactor: pass secrets as values, fetched once per scope A master key travelled through five layers of function values and three sync.Once guarded reuse; holding each secret where its scope lives shows where it comes from. Only the keychain prompt still waits for first use. * docs(rfcs): fetch secrets per extraction, not per record
This commit is contained in:
1 parent
a734e777a8
commit
f36790d4dd
41 files changed
+285
-388
No files matched your search
@@ -42,10 +42,13 @@ func newDumpCommand() *cobra.Command {
|
||||
}
|
||||
|
||||
func runDump(ctx context.Context, stderr io.Writer, flags app.DumpFlags, keychain, firefox passwordFlags) error {
|
||||
options, err := app.ValidateDump(flags, keychainPasswordFunc(keychain, os.Stdin), firefoxPasswordFunc(firefox, os.Stdin))
|
||||
options, err := app.ValidateDump(flags, keychainPasswordFunc(keychain, os.Stdin))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if options.FirefoxPrimaryPassword, err = readFirefoxPassword(ctx, firefox, os.Stdin); err != nil {
|
||||
return err
|
||||
}
|
||||
discovery, summary, err := app.Dump(ctx, options)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user