Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cpoppema/pass-browser-chrome
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3.0
Choose a base ref
...
head repository: cpoppema/pass-browser-chrome
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Mar 24, 2016

  1. Copy the full SHA
    fc7d4a0 View commit details
  2. Copy the full SHA
    ec896b1 View commit details
  3. Copy the full SHA
    0465846 View commit details
  4. Add a new option to remember the passphrase for a number of random ti…

    …meouts: never, 30s, 1m, 2m, 5m, 10m, 30m, 1h, 4h
    cpoppema committed Mar 24, 2016
    Copy the full SHA
    403503e View commit details
  5. Copy the full SHA
    56695cd View commit details
  6. Release 0.4.0

    cpoppema committed Mar 24, 2016
    Copy the full SHA
    454f120 View commit details

Commits on May 22, 2016

  1. Copy the full SHA
    33f28a6 View commit details
  2. Copy the full SHA
    5ecde25 View commit details

Commits on Jun 29, 2016

  1. Copy the full SHA
    3e9bc20 View commit details
  2. Release 0.5.0

    cpoppema committed Jun 29, 2016
    Copy the full SHA
    dba4f5c View commit details

Commits on Jul 20, 2016

  1. Increase compatibility for forms with javascript listeners by dispatc…

    …hing Events with bubbling enabled in triggerChange in content.js
    cpoppema committed Jul 20, 2016
    Copy the full SHA
    b1dd864 View commit details

Commits on Jul 21, 2016

  1. Release 0.6.0

    cpoppema committed Jul 21, 2016
    Copy the full SHA
    112a281 View commit details

Commits on Aug 8, 2016

  1. Update README

    cpoppema committed Aug 8, 2016
    Copy the full SHA
    ae6dfb2 View commit details

Commits on Nov 14, 2016

  1. Make public key inputs in options.html readonly instead of disabled s…

    …o their value can be copied to clipboard
    
    --
    This change is identical to cpoppema/pass-browser-firefox@550eafe, but is now also required for Chrome
    cpoppema committed Nov 14, 2016
    Copy the full SHA
    0c15adc View commit details
  2. Release 0.6.1

    cpoppema committed Nov 14, 2016
    Copy the full SHA
    5b5a148 View commit details

Commits on Jun 13, 2017

  1. Finally switch to using KeyboardEvent for keydown/keyup events, makin…

    …g them work everywhere properly.
    cpoppema committed Jun 13, 2017
    Copy the full SHA
    eaea5a5 View commit details
  2. Release 0.6.2

    cpoppema committed Jun 13, 2017
    Copy the full SHA
    39ae1d1 View commit details

Commits on Oct 1, 2017

  1. Copy the full SHA
    fd909af View commit details
  2. Copy the full SHA
    1ca6a23 View commit details
  3. Release 0.6.3

    cpoppema committed Oct 1, 2017
    Copy the full SHA
    0e89ea7 View commit details
  4. Update package-lock.json

    cpoppema committed Oct 1, 2017
    Copy the full SHA
    13c1dda View commit details
  5. Release 0.6.4

    cpoppema committed Oct 1, 2017
    Copy the full SHA
    6cd7ca9 View commit details

Commits on Jun 25, 2018

  1. Add dependency optlib to support OTP (2FA) tokens. Use jquery from np…

    …m. Update dependencies.
    
    Add buttons to fill/copy/show tokens - includes timed indicator when token expires.
    Show error notification for non-otp secrets.
    cpoppema committed Jun 25, 2018
    Copy the full SHA
    d510feb View commit details
  2. Merge branch 'feature/otp'

    cpoppema committed Jun 25, 2018
    Copy the full SHA
    adcca74 View commit details
  3. Release 0.7.0

    cpoppema committed Jun 25, 2018
    Copy the full SHA
    a9b76f2 View commit details

Commits on Aug 21, 2019

  1. Copy the full SHA
    695ec76 View commit details
  2. Load many secrets faster.

    cpoppema committed Aug 21, 2019
    Copy the full SHA
    eb34f34 View commit details
  3. Copy the full SHA
    d5e27aa View commit details

Commits on Apr 25, 2022

  1. Copy the full SHA
    6d664e6 View commit details
  2. Copy the full SHA
    3eeb001 View commit details
  3. Release 0.8.1

    cpoppema committed Apr 25, 2022
    Copy the full SHA
    b9b5530 View commit details

Commits on Dec 5, 2022

  1. Change to manifest v3.

    Also upgrade packages, including openpgp v5: import openpgp as module. (added esmify to browserify to support that)
    
    Make copy-to-clipboard work again by moving it to the popup, since it no longer works in a service worker.
    cpoppema committed Dec 5, 2022
    Copy the full SHA
    9c1eaf6 View commit details
  2. Copy the full SHA
    8ab20fa View commit details
  3. Copy the full SHA
    635e944 View commit details
  4. Release 0.9.0

    cpoppema committed Dec 5, 2022
    Copy the full SHA
    cad18cc View commit details

Commits on Dec 23, 2024

  1. Clean up test/temp files

    cpoppema committed Dec 23, 2024
    Copy the full SHA
    2ff924a View commit details
Showing with 19,237 additions and 325 deletions.
  1. +1 −1 .eslintrc
  2. +10 −5 Gruntfile.js
  3. +19 −4 README.md
  4. +31 −3 code/css/popup.css
  5. +32 −3 code/html/options.html
  6. +21 −7 code/html/popup.html
  7. +344 −63 code/js/background.js
  8. +51 −5 code/js/content.js
  9. +0 −4 code/js/libs/jquery.js
  10. +12 −11 code/js/libs/progress.js
  11. +44 −18 code/js/options.js
  12. +553 −134 code/js/popup.js
  13. +33 −32 code/js/server.js
  14. +12 −18 code/manifest.json
  15. +2 −1 lint-options.json
  16. +18,051 −0 package-lock.json
  17. +21 −16 package.json
  18. BIN unpacked-prod.zip
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ rules:
## use single quote, we can use double quote when escape chars
quotes: [2, "single", "avoid-escape"]
## 2 space indentation
indent: [2, 2]
indent: [2, 2, {"SwitchCase": 1}]
## add space after comma
comma-spacing: 2
## put semi-colon
15 changes: 10 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -56,10 +56,15 @@ module.exports = function(grunt) {
browserify: {
build: {
files: fileMaps.browserify,
options: { browserifyOptions: {
debug: true, // for source maps
standalone: pkg['export-symbol']
} }
options: {
plugin: [
[ require('esmify') ]
],
browserifyOptions: {
debug: true, // for source maps
standalone: pkg['export-symbol']
}
}
}
},

@@ -92,7 +97,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-uglify-es');
grunt.loadNpmTasks('grunt-contrib-watch');

//
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ Go6GqViRD01jmnVK8ysd8kyYKQPzKh61DiiwJkERbU7w6in8r483QliQdKH/
-----END PGP PUBLIC KEY BLOCK-----" | gpg --import -
```

You will see something like this, all you need to remember is one thing from this output: the key ID. The ID here is `5AF8663E`. You can also user the longer key ID you can find in the plugin options. In this example it would be A6A041765AF8663E.
You will see something like this, all you need to remember is one thing from this output: the key ID. The ID here is `5AF8663E`. You can also use the longer key ID you can find in the plugin options. In this example it would be A6A041765AF8663E.

```Shell
gpg: /home/me/.gnupg/trustdb.gpg: trustdb created
@@ -90,7 +90,7 @@ Run
gpg --sign-key 5AF8663E
```

Signing requires an existing keypair on your server. A keypair is also required for `pass` to add new secrets.
Signing requires an existing trusted key on your server. A trusted key is also required for `pass` to add new secrets.

**Tell pass to allow this key**

@@ -100,7 +100,7 @@ All that is left is to tell `pass` to encrypt your secrets using this public key
pass init {KEY ID 1} {KEY ID 2}
```

So let's say your existing keypair's ID is AF3D26E5, run
So let's say your existing trusted key's ID is AF3D26E5, run
```Shell
pass init AF3D26E5 5AF8663E
```
@@ -119,7 +119,22 @@ Password store initialized for AF3D26E5, 5AF8663E
github.com/cpoppema: reencrypting to 088BAD9F22BD2048 15EF6677CC78CF01
```

**Credits**
**One-Time-Passwords/2FA/Two-Factor-Authentication**

This plugin also supports generating tokens for your 2FA logins. To set this up. You can use this [pass plugin](https://github.com/tadfisher/pass-otp). Note that you're required to run pass >= 1.7.0 for the plugin to work.
Once installed, the plugin can link two secrets together that have similar usernames, one that is your actual username and one special username with an `-otp` suffix.

```
$ tree ~/.password-store | sed 's/├/\+/g; s/─/-/g; s/└/\\/g'
/home/cornelis/.password-store
+-- github.com
   +-- rcaldwell.gpg
   \-- rcaldwell-otp.gpg
```

The plugin will show new buttons beside an indicator `2FA` for supported secrets to either `Fill`, `Copy` or `Show` the token. *Note*: only "Only Time-based One Time Passwords" (TOTP) are possible at this time, "HMAC-based One Time Password" (HOTP) are _not_ supported.

## Credits

* [salsita](https://github.com/salsita/chrome-extension-skeleton) for providing a chrome extension skeleton
* [openpgpjs](https://github.com/openpgpjs/openpgpjs) for bringing openpgp to JavaScript in an easy-to-use way
34 changes: 31 additions & 3 deletions code/css/popup.css
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ body {
width: 330px;
}

.options-link {
.links {
padding-bottom: .9375rem;
}

@@ -63,11 +63,39 @@ body {
width: 160px;
}

.fill-form {
.secrets-list .list-group-item .token,
.secrets-list .list-group-item .token-expiry,
.secrets-list .list-group-item .token-copy,
.secrets-list .list-group-item .token-show,
.secrets-list .list-group-item .token-fill {
display: none;
}

.secrets-list .list-group-item.otp-enabled .token,
.secrets-list .list-group-item.otp-enabled .token-expiry {
display: block;
}

.secrets-list .list-group-item.otp-enabled .token-copy,
.secrets-list .list-group-item.otp-enabled .token-show,
.secrets-list .list-group-item.otp-enabled .token-fill {
display: inline-block;
}

.secrets-list .list-group-item-text input.token,
.secrets-list .list-group-item-text .token-expiry {
width: 130px;
}


.form-fill {
margin-top: 2px;
}

.fill-form,
.form-fill,
.token-copy,
.token-show,
.token-fill,
.username-copy,
.password-show,
.password-copy {
35 changes: 32 additions & 3 deletions code/html/options.html
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
</fieldset>
<fieldset class="form-group">
<label for="passphrase">Passphrase *</label>
<small class="text-muted">This password is required every time you want to access your passwords.</small>
<small class="text-muted">This password is required every time you need to unlock your passwords.</small>
<input type="password" id="passphrase" class="form-control" name="passphrase" required>
</fieldset>
<fieldset class="form-group">
@@ -28,17 +28,46 @@
</fieldset>
<fieldset class="form-group">
<label for="passphrase">Public key</label>
<textarea id="public-key" name="public-key" class="form-control" disabled></textarea>
<textarea id="public-key" name="public-key" class="form-control" readonly></textarea>
</fieldset>
<fieldset class="form-group">
<label for="key-name">Key ID</label>
<small class="text-muted">This is your public key ID.</small>
<div class="row">
<div class="col-xs-6">
<input type="text" id="public-key-id" class="form-control" name="key-id" disabled>
<input type="text" id="public-key-id" class="form-control" name="key-id" readonly>
</div>
</div>
</fieldset>
<fieldset class="form-group">
<label for="passphrase">How long do you want your passphrase remembered ?</label>
<div id="timeout" class="btn-group" data-toggle="buttons">
<label class="btn btn-success-outline">
<input type="radio" name="timeout" value="0"> Never
</label>
<label class="btn btn-primary-outline">
<input type="radio" name="timeout" value="60"> 1 min
</label>
<label class="btn btn-primary-outline">
<input type="radio" name="timeout" value="120"> 2 min
</label>
<label class="btn btn-primary-outline">
<input type="radio" name="timeout" value="300"> 5 min
</label>
<label class="btn btn-warning-outline">
<input type="radio" name="timeout" value="600"> 10 min
</label>
<label class="btn btn-warning-outline">
<input type="radio" name="timeout" value="1800"> 30 min
</label>
<label class="btn btn-danger-outline">
<input type="radio" name="timeout" value="3600"> 1 h
</label>
<label class="btn btn-danger-outline">
<input type="radio" name="timeout" value="14400"> 4 h
</label>
</div>
</fieldset>
<button type="button" id="key-gen" class="btn btn-primary">Generate key</button>
<button type="button" id="save" class="btn btn-secondary" disabled>Save</button>
<span id="status"></span>
28 changes: 21 additions & 7 deletions code/html/popup.html
Original file line number Diff line number Diff line change
@@ -10,22 +10,25 @@
</head>
<body>
<div class="container">
<div class="options-link text-xs-right">
<div class="links text-xs-right">
<button id="logout" type="button" class="btn btn-secondary btn-sm" style="display: none;">Logout</button>
<button id="go-to-options" type="button" class="btn btn-secondary btn-sm">Options</button>
</div>

<div class="alerts"></div>

<!-- unlock form -->
<form id="unlock-form" class="form-signin" autocomplete="off">
<input type="password" id="passphrase" class="form-control" placeholder="Passphrase" autofocus>
<button id="unlock" class="btn btn-lg btn-primary btn-block"><span>Unlock</span></button>
</form>
<form id="unlock-form" class="form-signin" autocomplete="off"></form>

<!-- list of secrets, visible after unlock -->
<!-- list of secrets -->
<div id="secrets"></div>
</div>

<template id="unlock-form-template">
<input type="password" id="passphrase" class="form-control" placeholder="Passphrase" autofocus="">
<button id="unlock" class="btn btn-lg btn-primary btn-block"><span>Unlock</span></button>
</template>

<template id="secrets-list-template">
<form id="search-form" class="form-search" autocomplete="off">
<input type="text" id="search" class="form-control" placeholder="Search.." autofocus="">
@@ -36,13 +39,24 @@

<template id="secrets-list-item-template">
<li class="list-group-item secret">
<span class="label label-default label-pill pull-xs-right fill-form">Fill</span>
<!-- This is rendered to the right of the domain below -->
<span class="label label-default label-pill pull-xs-right form-fill">Fill</span>
<h5 class="list-group-item-heading domain"></h5>

<!-- This is rendered to the right of the username below -->
<span class="label label-default label-pill pull-xs-right username-copy copy" data-copied-text="Copied" data-reset-text="Copy">Copy</span>
<p class="list-group-item-text"><input type="text" class="username" readonly></p>

<!-- This is rendered to the right of the password below -->
<span class="label label-default label-pill pull-xs-right password-show">Show</span>
<span class="label label-default label-pill pull-xs-right password-copy copy" data-copied-text="Copied" data-reset-text="Copy">Copy</span>
<p class="list-group-item-text password"><input type="text" class="password" readonly value="******"></p>

<!-- This is rendered to the right of the otp token below -->
<span class="label label-default label-pill pull-xs-right token-show">Show</span>
<span class="label label-default label-pill pull-xs-right token-copy copy" data-copied-text="Copied" data-reset-text="Copy">Copy</span>
<span class="label label-default label-pill pull-xs-right token-fill">Fill</span>
<p class="list-group-item-text token"><input type="text" class="token" readonly value="2FA"><span class="token-expiry"></span></p>
</li>
</template>

Loading