Commit Graph

8 Commits

Author SHA1 Message Date
ttalty db221dee05
[PM 1672] SecureSafe Import Url Header Fix (#6623)
* Get the url field name ignoring the case format

* Adding test cases for the SecureSafe importer

* Updating test cases and the way the url field is selected

* updating the variable name from url to urlField
2023-11-02 10:00:58 -04:00
Bernd Schoolmann 77ee09540e
[PM-4163] Fix protonpass importer when totp field is not a URL (#6474)
* Fix protonpass importer when totp field is not a URL

* Simplify ProtonPass importer totp handling

* Use getValueOrDefault for totp import in ProtonPass importer

* Use getValueOrDefault for other ProtonPass importer fields

---------

Co-authored-by: ttalty <144813356+ttalty@users.noreply.github.com>
2023-10-31 13:37:35 -04:00
KuhnChris f2df456516
[PM-3100] Fixes imports of "reduced" psono data (#5859)
* Fixes imports of "reduced" psono data

* Fix typo in file name

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2023-08-25 21:16:53 +02:00
Bernd Schoolmann e016ed001e
[PM-2899] Implement ProtonPass json importer (#5766)
* Implement ProtonPass json importer

* Add protonpass-importer json type definition

* Fix alphabetical order in importer imports

* Add importer error message for encrypted protonpass imports

* Add i18n to protonpass importer

* Add protonpass (zip) importer

* Fix protonpass importer

* Add unit tests for protonpass importer

* Make protonpass importer not discard totp codes

* Merge protonpass json & zip importers

* Add protonpass creditcard import & fix note import

* Fix protonpass zip import not recognizing zip files on windows/chrome

* Make protonpass importer use vault types

* Make protonpass importer treat vaults as folders

* Make protonpass importer treat folders as collections for organizations

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>

* Add types to protonpass test data

* Fix protonpass importer's moveFoldersToCollections

* Add tests for folders/collections

* Remove unecessary type cast in protonpass importer

* Remove unecessary type annotations in protonpass importer

* Add assertion for credit card cvv in protonpass importer

* Handle trashed items in protonpass importer

* Fix setting expiry month on credit cards

* Fix wrong folder-assignment

Only the first item of a "vault" was getting assigned to a folder

Extend unit tests to verify behaviour

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith@web.de>
2023-08-16 16:17:03 +02:00
Jim Hays 9f7bf1132b
[PM-1877] Spellcheck (#5237)
* Bug fix: "vaule" -> "value"

* Bug fix: "aria-descibedby" -> "aria-describedby"

* Bug fix: "chararacter" -> "character"

* Fix typos in comments

* Fix typos in documentation

* Fix typo in test description

* Fix typos in sample data: "childen" -> "children"

* Fix typos in sample data: "pargraphs" -> "paragraphs"

* Fixes to test data: "Additinoal", "Informaion" -> "Additional", "Information"

* Fix typo in test data: "dolhpin" -> "dolphin"

* Fix typo in local variable: "attachement" -> "attachment"

* Fix typo in method name: "detachOrganizastion" -> "detachOrganization"

* Fix typo in method name: "getNewlyAddedDomians" -> "getNewlyAddedDomains"

* Fix typo: "EncyptedMessageResponse" -> "EncryptedMessageResponse"

* Fix typo: "miliseconds" -> "milliseconds"

* Fix typo: "authResponsePushNotifiction" -> "authResponsePushNotification"

* Fix typo: "getPushNotifcationObs" -> "getPushNotificationObs"

* Fix typo: "ExpriationDate" -> "ExpirationDate"

* Fix typo: "OrganizationUserResetPasswordDetailsReponse" -> "OrganizationUserResetPasswordDetailsResponse"

* Fix typo: "DISPLAY_TITLE_ATTRIBUE" -> "DISPLAY_TITLE_ATTRIBUTE"

* Fix typo: "credentialretreivalCommandHandler" -> "credentialRetrievalCommandHandler"

* Fix typo: "buildLoginCredntials" -> "buildLoginCredentials"

* Fix typo: "_mappedCredentialsColums" -> "_mappedCredentialsColumns"

* Fix typo: "_mappedPersonalInfoAsIdentiyColumns" -> "_mappedPersonalInfoAsIdentityColumns"

* Fix typo in input name: "StroageGbAdjustment" -> "StorageGbAdjustment"

* Fix typo in const: "encryptionAlogrithm" -> "encryptionAlgorithm"

---------

Co-authored-by: Daniel James Smith <djsmith@web.de>
2023-04-26 12:16:07 +02:00
aj-rosado 2ad739b5a8
[PM-1684] Broken roboform importer (#5137)
* PM-1684 - Set null or empty validation on start of processFolder method

* PM-1684 - Added tests to roboform-csv-importer
2023-04-07 11:23:34 +01:00
Daniel James Smith cf2d8b266a
[PM-1071] Display import-details-dialog on successful import (#4817)
* Prefer callback over error-flow to prompt for password

Remove error-flow to request file password
Prefer callback, which has to be provided when retrieving/creating an instance.
Delete ImportError
Call BitwardenPasswordProtector for all Bitwarden json imports, as it extends BitwardenJsonImporter
Throw errors instead of returning
Return ImportResult
Fix and extend tests import.service
Replace "@fluffy-spoon/substitute" with "jest-mock-extended"

* Fix up test cases

Delete bitwarden-json-importer.spec.ts
Add test case to ensure bitwarden-json-importer.ts is called given unencrypted or account-protected files

* Move file-password-prompt into dialog-folder

* Add import success dialog

* Fix typo

* Only list the type when at least one got imported

* update copy based on design feedback

* Remove unnecessary /index import

* Remove promptForPassword_callback from interface

PR feedback from @MGibson1 that giving every importer the ability to request a password is unnecessary. Instead, we can pass the callback into the constructor for every importer that needs this functionality

* Remove unneeded import of BitwardenJsonImporter

* Fix spec constructor

* Fixed organizational import

Added an else statement, or else we'd import into an org and then also import into an individual vault
2023-04-06 22:41:09 +02:00
Daniel James Smith a5a12a6723
[PM-328] Move `common/importer` to `libs/importer` (tools-migration) (#5060)
* Create and register new libs/importer

Create package.json
Create tsconfig
Create jest.config
Extend shared and root tsconfig and jest.configs
Register with eslint

* Move importer-related files to libs/importer

* Move importer-spec-related files to libs/importer

Move import.service.spec

* Update package-lock.json

* Set CODEOWNERS for new libs/importer

* Register libs/importer with cli and fix imports

* Register libs/importer with web and fix imports

* Move importOption into models

Rename importOptions to import-options

* Fix linting issues after updating prettier

* Only expose necessary files from libs/importer

Fix tsconfig files
- Removes the trailing /index on imports in web/cli

As the spec-files no longer can access the internals via @bitwarden/importer they import by path (../src/importers)

* Add barrel files to vendors with more than one importer
2023-03-23 11:43:27 +01:00