From af61732800624284dfc023c124e99757c49965cf Mon Sep 17 00:00:00 2001 From: Thomas Rittson Date: Fri, 14 May 2021 10:04:08 +1000 Subject: [PATCH 1/4] Copy TOTP after all autofills, remove old UI --- src/_locales/en/messages.json | 6 ------ src/popup/settings/options.component.html | 12 ------------ src/popup/settings/options.component.ts | 8 -------- src/services/autofill.service.ts | 5 +---- 4 files changed, 1 insertion(+), 30 deletions(-) diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 3b5121d7f5..44d98f4cc8 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -898,12 +898,6 @@ "enableAutoFillOnPageLoadDesc": { "message": "If a login form is detected, automatically perform an auto-fill when the web page loads." }, - "enableAutoTotpCopyOnAutoFill": { - "message": "Automatic TOTP Copy after Page Load" - }, - "enableAutoTotpCopyOnAutoFillDesc": { - "message": "If Auto-fill On Page Load is enabled, the TOTP verification code is automatically copied to your clipboard after loading the web page. This is overridden by Disable Automatic TOTP Copy." - }, "experimentalFeature": { "message": "This is currently an experimental feature. Use at your own risk." }, diff --git a/src/popup/settings/options.component.html b/src/popup/settings/options.component.html index fd7563a12d..83bbc329a6 100644 --- a/src/popup/settings/options.component.html +++ b/src/popup/settings/options.component.html @@ -161,17 +161,5 @@ {{'warning' | i18n}}: {{'experimentalFeature' | i18n}} -
-
-
- - -
-
- -
diff --git a/src/popup/settings/options.component.ts b/src/popup/settings/options.component.ts index 355e47a328..60db20ae73 100644 --- a/src/popup/settings/options.component.ts +++ b/src/popup/settings/options.component.ts @@ -7,7 +7,6 @@ import { UriMatchType } from 'jslib/enums/uriMatchType'; import { I18nService } from 'jslib/abstractions/i18n.service'; import { MessagingService } from 'jslib/abstractions/messaging.service'; -import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; import { StateService } from 'jslib/abstractions/state.service'; import { StorageService } from 'jslib/abstractions/storage.service'; import { TotpService } from 'jslib/abstractions/totp.service'; @@ -22,7 +21,6 @@ export class OptionsComponent implements OnInit { disableFavicon = false; disableBadgeCounter = false; enableAutoFillOnPageLoad = false; - enableAutoTotpCopyOnAutoFill = false; disableAutoTotpCopy = false; disableContextMenuItem = false; disableAddLoginNotification = false; @@ -72,8 +70,6 @@ export class OptionsComponent implements OnInit { this.enableAutoFillOnPageLoad = await this.storageService.get( ConstantsService.enableAutoFillOnPageLoadKey); - this.enableAutoTotpCopyOnAutoFill = await this.totpService.isAutoCopyOnAutoFillEnabled(); - this.disableAddLoginNotification = await this.storageService.get( ConstantsService.disableAddLoginNotificationKey); @@ -124,10 +120,6 @@ export class OptionsComponent implements OnInit { await this.storageService.save(ConstantsService.enableAutoFillOnPageLoadKey, this.enableAutoFillOnPageLoad); } - async updateAutoTotpCopyOnAutoFill() { - await this.storageService.save(ConstantsService.enableAutoTotpCopyOnAutoFillKey, this.enableAutoTotpCopyOnAutoFill); - } - async updateDisableFavicon() { await this.storageService.save(ConstantsService.disableFaviconKey, this.disableFavicon); await this.stateService.save(ConstantsService.disableFaviconKey, this.disableFavicon); diff --git a/src/services/autofill.service.ts b/src/services/autofill.service.ts index 08f7b41a2a..e73d7e2708 100644 --- a/src/services/autofill.service.ts +++ b/src/services/autofill.service.ts @@ -259,13 +259,10 @@ export default class AutofillService implements AutofillServiceInterface { return; } - const copyTotpOnAutoFill = await this.totpService.isAutoCopyOnAutoFillEnabled(); - const shouldCopyTotp = fromCommand || copyTotpOnAutoFill; - const totpCode = await this.doAutoFill({ cipher: cipher, pageDetails: pageDetails, - skipTotp: !shouldCopyTotp, + skipTotp: false, skipLastUsed: !fromCommand, skipUsernameOnlyFill: !fromCommand, onlyEmptyFields: !fromCommand, From 59c50f7fb09e50db2142f2b0195a9797a3d92e5d Mon Sep 17 00:00:00 2001 From: Thomas Rittson Date: Mon, 17 May 2021 13:19:33 +1000 Subject: [PATCH 2/4] remove unused skipTotp option on doAutoFill --- src/services/autofill.service.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/services/autofill.service.ts b/src/services/autofill.service.ts index e73d7e2708..386ad20e78 100644 --- a/src/services/autofill.service.ts +++ b/src/services/autofill.service.ts @@ -211,8 +211,8 @@ export default class AutofillService implements AutofillServiceInterface { url: tab.url, }, { frameId: pd.frameId }); - if (options.cipher.type !== CipherType.Login || totpPromise || options.skipTotp || - !options.cipher.login.totp || (!canAccessPremium && !options.cipher.organizationUseTotp)) { + if (options.cipher.type !== CipherType.Login || totpPromise || !options.cipher.login.totp || + (!canAccessPremium && !options.cipher.organizationUseTotp)) { return; } @@ -262,7 +262,6 @@ export default class AutofillService implements AutofillServiceInterface { const totpCode = await this.doAutoFill({ cipher: cipher, pageDetails: pageDetails, - skipTotp: false, skipLastUsed: !fromCommand, skipUsernameOnlyFill: !fromCommand, onlyEmptyFields: !fromCommand, From 40ffc9dc21e088a2380d183c042d1206808aebf0 Mon Sep 17 00:00:00 2001 From: Thomas Rittson Date: Mon, 17 May 2021 13:25:39 +1000 Subject: [PATCH 3/4] bump jslib --- jslib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jslib b/jslib index 306aef73d4..8659d0975d 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 306aef73d459dfad8a7a06c32442c9ed2d56922e +Subproject commit 8659d0975ddb7dc70c0246b4b9acf81e013cdde3 From b5eda81d7292b548b71fbda84a7eb061a2405276 Mon Sep 17 00:00:00 2001 From: Vince Grassia <593223+vgrassia@users.noreply.github.com> Date: Mon, 17 May 2021 16:09:59 -0400 Subject: [PATCH 4/4] Pin versions of actions in workflow (#1852) --- .github/workflows/build.yml | 22 +++++++++++----------- .github/workflows/release.yml | 24 ++++++++++++------------ 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3fdb2f43b2..89c1806d7d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - name: Set up cloc run: | @@ -30,7 +30,7 @@ jobs: adj_build_number: ${{ steps.gen_vars.outputs.adj_build_number }} steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - name: Get Package Version id: gen_vars @@ -46,7 +46,7 @@ jobs: needs: setup steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - name: Testing locales - extName length run: | @@ -80,12 +80,12 @@ jobs: BUILD_NUMBER: ${{ needs.setup.outputs.adj_build_number }} steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - name: Set up Node - uses: actions/setup-node@v1 + uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea with: - node-version: '14.x' + node-version: '14' - name: Print environment run: | @@ -102,31 +102,31 @@ jobs: run: gulp ci - name: Upload opera artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 with: name: dist-opera-${{ env.BUILD_NUMBER }}.zip path: dist/dist-opera-${{ env.BUILD_NUMBER }}.zip - name: Upload chrome artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 with: name: dist-chrome-${{ env.BUILD_NUMBER }}.zip path: dist/dist-chrome-${{ env.BUILD_NUMBER }}.zip - name: Upload firefox artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 with: name: dist-firefox-${{ env.BUILD_NUMBER }}.zip path: dist/dist-firefox-${{ env.BUILD_NUMBER }}.zip - name: Upload edge artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 with: name: dist-edge-${{ env.BUILD_NUMBER }}.zip path: dist/dist-edge-${{ env.BUILD_NUMBER }}.zip - name: Upload coverage artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 with: name: coverage-${{ env.BUILD_NUMBER }}.zip path: coverage/coverage-${{ env.BUILD_NUMBER }}.zip diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4aed1f54f..105845b70d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: adj_build_number: ${{ steps.gen_vars.outputs.adj_build_number }} steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - name: Get Package Version id: gen_vars @@ -54,7 +54,7 @@ jobs: - name: Create Draft Release id: create_release - uses: actions/create-release@v1 + uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -69,7 +69,7 @@ jobs: needs: setup steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - name: Testing locales - extName length run: | @@ -103,12 +103,12 @@ jobs: BUILD_NUMBER: ${{ needs.setup.outputs.adj_build_number }} steps: - name: Checkout repo - uses: actions/checkout@v2 + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - name: Set up Node - uses: actions/setup-node@v1 + uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea with: - node-version: '14.x' + node-version: '14' - name: Print environment run: | @@ -137,7 +137,7 @@ jobs: call 7z a browser-source-%BUILD_NUMBER%.zip "Source\*" - name: upload opera release asset - uses: actions/upload-release-asset@v1 + uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -147,7 +147,7 @@ jobs: asset_content_type: application - name: upload chrome release asset - uses: actions/upload-release-asset@v1 + uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -157,7 +157,7 @@ jobs: asset_content_type: application/zip - name: upload firefox release asset - uses: actions/upload-release-asset@v1 + uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -167,7 +167,7 @@ jobs: asset_content_type: application/zip - name: upload edge release asset - uses: actions/upload-release-asset@v1 + uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -177,7 +177,7 @@ jobs: asset_content_type: application/zip - name: upload browser source zip release asset - uses: actions/upload-release-asset@v1 + uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -187,7 +187,7 @@ jobs: asset_content_type: application/zip - name: upload coverage release asset - uses: actions/upload-release-asset@v1 + uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: