Commit Graph

12 Commits

Author SHA1 Message Date
Jonathan Prusik ee2f2e1fb1
[PM-4127] Bugfix - Check original target tab URL before executing deferred action due to reprompt (#6434)
* remove solve for pm-3613 (will readdress in pm-4014)

* check original target tab URL before executing deferred action due to reprompt

* only check if target tab host+path changed during reprompt
2023-10-13 13:38:48 -04:00
Jonathan Prusik 621ffa01aa
[PM-3613] Check for page change before delayed auto-fill action execution (#6280)
* check for page change before delayed auto-fill action execution

* update test
2023-09-19 16:37:21 -04:00
Jonathan Prusik 42193aecb8
[PM-1407] Improve iframe sandbox detection (#5976)
* improve iframe sandbox detection

* code cleanup

Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>

* update autofill v1 logic as well

---------

Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>
2023-08-29 09:10:16 -04:00
Cesar Gonzalez d26dc9c8ac
[PM-2762] Update Logic on HTTP Warning (#5730)
* [PM-2762] Update Logic on HTTP Warning

* [PM-2762] Update apps/browser/src/autofill/content/autofill.js

Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>

---------

Co-authored-by: Jonathan Prusik <jprusik@users.noreply.github.com>
2023-07-14 13:29:36 +00:00
Manuel b31203d64f
Added textarea (#4155) 2023-05-22 11:28:00 -04:00
Jonathan Prusik a64cecff68
[PM-1498] Update the iframe autofill alert text (#5364)
* update text for iframe autofill warning confirm dialog

* use localized confirmation messages

* rewrite urlNotSecure

Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>

---------

Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>
2023-05-10 11:27:33 -04: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
Todd Martin 8f9ce3dc8a
Revert "[PS-1918] Make autofill doc-scanner traverse into ShadowRoot (#4119)" (#5147)
This reverts commit 208be8dfbf.
2023-04-04 08:07:48 -04:00
Thomas Rittson 0d85bdc931
[PM-1397] Display a warning when a user attempts to auto-fill an iframe (#4994)
* add settingsService.getEquivalentDomains
* check that an iframe URL matches cipher.login.uris before autofilling
* disable autofill on page load if it doesn't match
* show a warning to the user on regular autofill if it doesn't match

---------

Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
2023-03-15 11:19:16 +10:00
Rafael Kraut 208be8dfbf
[PS-1918] Make autofill doc-scanner traverse into ShadowRoot (#4119)
* This commit implements the following main changes:

- Query elements by using a TreeWalker instead of `document.querySelector[All]`. The reason for this is that `querySelector[All]` doesn't traverse into elements with ShadowRoot.
- Recursively traverse into elements with `openOrClosedShadowRoot` or `Element.shadowRoot` (depending on browser support) inside TreeWalker loop.
- Use new query logic everywhere inside `autofill.js`. This also means we need to use filter functions to find elements with specific nodeNames and/or attributes instead of CSS selector strings.
- Add two new `instanceof Element` checks to prevent `Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'." errors`.

This change is fully backward compatible. If `openOrClosedShadowRoot` is not available it will always return undefined and we will never traverse into ShadowRoots just as the behavior was before this change.

* refactor: outsource recursive logic to accumulatingQueryDocAll

We don't want the `els` argument on the `queryDocAll` function because it's never used from outside the function itself. Thus the recursive logic is moved to `accumulatingQueryDocAll`.
Now `queryDocAll` creates an empty array and passes it to `accumulatingQueryDocAll` which recursively walks the document and all ShadowRoots and pushes all found nodes directly to the referenced array.

The decision to use a directly mutated array instead of `Array.concat(els)` or `Array.push(...els)` is for performance reasons. Pushing to the referenced array was 74% faster than using `Array.push` with spread operator and even 90% faster than using `Array.concat`.

Co-authored-by: Chad Miller <64046472+chadm-sq@users.noreply.github.com>

* refactor: extract input field relevance check into own function

Addresses CodeScene analysis violation "Bumpy Road Ahead" where conditional logic is checked for a nesting of 2 or deeper.

* refactor: use proper element attribute handling

- use el.type attribute instead of el.attribute.type on input elements. This makes sure we also get 'text' when type attribute is not explicitly specified
- use el.htmlFor attribute instead of el.attribute.for on label elements
- use `hasAttribute` and `getAttribute` methods instead of `attributes[]` which is discouraged by https://quirksmode.org/dom/core/#attributes
- improve readability of `isRelevantInputField`

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Chad Miller <64046472+chadm-sq@users.noreply.github.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2023-02-20 08:43:18 +10:00
Todd Martin da963346db
Add autofill field comments (#4568)
* Added comments.

* More comments.

* More function comments.

* Changed comment to add missing words.

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>

* Added better comment on fill query function.

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>

* More comments.

* Added additional documentation on viewable and visible

* Undid changes to the logic to avoid any chance of breaking anything.

---------

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2023-02-10 09:51:54 -05:00
Robyn MacCallum 7ebedbecfb
[SG-998] and [SG-999] Vault and Autofill team refactor (#4542)
* Move DeprecatedVaultFilterService to vault folder

* [libs] move VaultItemsComponent

* [libs] move AddEditComponent

* [libs] move AddEditCustomFields

* [libs] move attachmentsComponent

* [libs] folderAddEditComponent

* [libs] IconComponent

* [libs] PasswordRepormptComponent

* [libs] PremiumComponent

* [libs] ViewCustomFieldsComponent

* [libs] ViewComponent

* [libs] PasswordRepromptService

* [libs] Move FolderService and FolderApiService abstractions

* [libs] FolderService imports

* [libs] PasswordHistoryComponent

* [libs] move Sync and SyncNotifier abstractions

* [libs] SyncService imports

* [libs] fix file casing for passwordReprompt abstraction

* [libs] SyncNotifier import fix

* [libs] CipherServiceAbstraction

* [libs] PasswordRepromptService abstraction

* [libs] Fix file casing for angular passwordReprompt service

* [libs] fix file casing for SyncNotifierService

* [libs] CipherRepromptType

* [libs] rename CipherRepromptType

* [libs] CipherType

* [libs] Rename CipherType

* [libs] CipherData

* [libs] FolderData

* [libs] PasswordHistoryData

* [libs] AttachmentData

* [libs] CardData

* [libs] FieldData

* [libs] IdentityData

* [libs] LocalData

* [libs] LoginData

* [libs] SecureNoteData

* [libs] LoginUriData

* [libs] Domain classes

* [libs] SecureNote

* [libs] Request models

* [libs] Response models

* [libs] View part 1

* [libs] Views part 2

* [libs] Move folder services

* [libs] Views fixes

* [libs] Move sync services

* [libs] cipher service

* [libs] Types

* [libs] Sync file casing

* [libs] Fix folder service import

* [libs] Move spec files

* [libs] casing fixes on spec files

* [browser] Autofill background, clipboard, commands

* [browser] Fix ContextMenusBackground casing

* [browser] Rename fix

* [browser] Autofill content

* [browser] autofill.js

* [libs] enpass importer spec fix

* [browser] autofill models

* [browser] autofill manifest path updates

* [browser] Autofill notification files

* [browser] autofill services

* [browser] Fix file casing

* [browser] Vault popup loose components

* [browser] Vault components

* [browser] Manifest fixes

* [browser] Vault services

* [cli] vault commands and models

* [browser] File capitilization fixes

* [desktop] Vault components and services

* [web] vault loose components

* [web] Vault components

* [browser] Fix misc-utils import

* [libs] Fix psono spec imports

* [fix] Add comments to address lint rules
2023-01-31 16:08:37 -05:00