1
0
mirror of https://github.com/bitwarden/browser synced 2024-12-17 11:55:12 +01:00
bitwarden-estensione-browser/apps
Andrew Jorgensen d77f77cea9
[PM-1803] Fail on unsupported export format (#5197)
* Fail on unsupported export format

Issue #5194: https://github.com/bitwarden/clients/issues/5194

The cli previously would take any value for the export format and
default to unencrypted json if it wasn't a supported format. This
behavior is a little dangerous because if for instance typed
"json_encrypted" instead of "encrypted_json" and naively saved the file
you might be surprised to learn the payload was not actually encrypted
even though the command completed successfully.

This change adds a guard clause when converting the string value passed
in via `--format` into the type `ExportFormat` to ensure that the format
provided is one of the supported types.

* Move isSupportedExportFormat to private method
2023-04-17 21:54:03 +02:00
..
browser [AC-1070] Enforce master password policy on login (#4795) 2023-04-17 07:35:37 -07:00
cli [PM-1803] Fail on unsupported export format (#5197) 2023-04-17 21:54:03 +02:00
desktop [PM-1834] Add Windows 8/8.1 deprecation notice (#5213) 2023-04-17 17:03:40 +02:00
web [AC-1070] Enforce master password policy on login (#4795) 2023-04-17 07:35:37 -07:00