Skip to content

Commit cccdea8

Browse files
committed
Add optional AEP generation method for enhanced site compatibility
1 parent f24724c commit cccdea8

File tree

10 files changed

+34
-8
lines changed

10 files changed

+34
-8
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Differences to the original version:
1414
* Show the passwords concealed to use drag and drop
1515
* Smaller theme with accent color
1616
* Sync works, but disabled due to missing API keys
17+
* Add new AEP password generation method to ensure 2 characters of every charset and symbol compatibility (with sites like ebay.com)
1718

1819
Using multiple master passwords
1920
-------------------------------

lib/crypto.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ export function derivePasswordUniversal(params)
214214
{
215215
let types = {
216216
generated: {hasher: deriveBitsLegacy, stringifier: toPassword},
217-
generated2: {hasher: deriveBits, stringifier: toPassword}
217+
generated2: {hasher: deriveBits, stringifier: toPassword},
218+
generatedAep: {hasher: deriveBits, stringifier: toPasswordAep}
218219
};
219220

220221
let impl = types[params.type];
@@ -251,6 +252,22 @@ function toPassword(array, lower, upper, number, symbol)
251252
return toPasswordUniversal(array, charsettings);
252253
}
253254

255+
function toPasswordAep(array, lower, upper, number, symbol)
256+
{
257+
let charsettings = [];
258+
259+
if (lower)
260+
charsettings.push({charset: "abcdefghijklmnopqrstuvwxyz", min: 2, max: 1024});
261+
if (upper)
262+
charsettings.push({charset: "ABCDEFGHIJKLMNOPQRSTUVWXYZ", min: 2, max: 1024});
263+
if (number)
264+
charsettings.push({charset: "0123456789", min: 2, max: 1024});
265+
if (symbol)
266+
charsettings.push({charset: "!#$%&*+-?@", min: 2, max: 1024});
267+
268+
return toPasswordUniversal(array, charsettings);
269+
}
270+
254271
function toPasswordUniversal(array, charsettings)
255272
{
256273
for (let s of charsettings)

lib/passwords.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ export function setSite(entry)
346346
});
347347
}
348348

349-
export function addGenerated({site, name, revision, length, lower, upper, number, symbol, notes}, replaceExisting)
349+
export function addGenerated({site, name, revision, length, lower, upper, number, symbol, notes, type_aep}, replaceExisting)
350350
{
351351
return lock.acquire().then(() => _ensureSiteData(site)).then(() =>
352352
{
@@ -362,7 +362,7 @@ export function addGenerated({site, name, revision, length, lower, upper, number
362362
if (exists)
363363
throw "alreadyExists";
364364

365-
let type = "generated2";
365+
let type = type_aep ? "generatedAep" : "generated2";
366366
let data = {
367367
site, name, revision, type, length, lower, upper, number, symbol
368368
};

locale/en_US/panel/components/GeneratedPassword.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"replace_warning": "Making this a generated password will change its value. Make sure that you already filled in \"current password\" in the website's password change form.",
33
"keep_notes": "Keep notes from original password",
44
"length_label": "Length:",
5+
"type_aep_label": "AEP generation method",
6+
"type_aep_title": "Generates passwords that are more compatible with certain sites (ensures 2 characters of every charset and uses less symbols)",
57
"allowed_characters_label": "Allowed characters:",
68
"submit": "Generate password",
79

locale/en_US/panel/components/PasswordEntry.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"password_menu": "All actions",
3+
"password_type_generatedAep": "Generated AEP password",
34
"password_type_generated2": "Generated password",
45
"password_type_stored": "Stored password",
56
"password_length": "Length:",

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"description": "__MSG_description__",
1515
"author": "Wladimir Palant / Adrium",
1616
"homepage_url": "https://github.com/adrium/easypass",
17-
"version": "2.2.3",
17+
"version": "2.2.3.2020",
1818
"permissions": [
1919
"activeTab",
2020
"storage",

media/screenshot2.png

1.73 KB
Loading

ui/allpasswords/components/PasswordInfo.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
<iconic-link class="password-remove-link" :title="$t('/(panel)(components)(PasswordMenu)remove_password')" @click="removePassword" />
2626
</div>
2727
<div class="password-info">
28-
<template v-if="password.type == 'generated2'">
29-
<div class="password-type">{{ $t("/(panel)(components)(PasswordEntry)password_type_generated2") }}</div>
28+
<template v-if="password.type.indexOf('generated') == 0">
29+
<div class="password-type">{{ $t("/(panel)(components)(PasswordEntry)password_type_" + password.type) }}</div>
3030
<div>{{ $t("/(panel)(components)(PasswordEntry)password_length") }} {{ password.length }}</div>
3131
<div>{{ $t("/(panel)(components)(PasswordEntry)allowed_characters") }} {{ allowedChars }}</div>
3232
</template>

ui/panel/components/GeneratedPassword.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
<label><input v-model="number" type="checkbox">789</label>
3434
<label><input v-model="symbol" type="checkbox">+^;</label>
3535
</div>
36+
<div class="charsets-container">
37+
<label :title="$t('type_aep_title')"><input v-model="type_aep" type="checkbox">{{ $t("type_aep_label") }}</label>
38+
</div>
3639

3740
<!-- Charset checkboxes are aggregated into a single hidden input to simplify validation -->
3841
<validated-input v-model="charsets" :error.sync="charsetsError" :visible="false" @validate="validateCharsets" />
@@ -98,6 +101,7 @@ export default {
98101
upper: getProp("upper", true),
99102
number: getProp("number", true),
100103
symbol: getProp("symbol", true),
104+
type_aep: getProp("type_aep", false),
101105
charsets: "",
102106
charsetsError: null,
103107
keepNotes: !!this.password
@@ -148,6 +152,7 @@ export default {
148152
upper: this.upper,
149153
number: this.number,
150154
symbol: this.symbol,
155+
type_aep: this.type_aep,
151156
notes: this.keepNotes ? this.password.notes : null
152157
}, this.options.replacing).then(pwdList =>
153158
{

ui/panel/components/PasswordEntry.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ export default {
7474
{
7575
let tooltip = "";
7676
let password = this.password;
77-
if (password.type == "generated2")
77+
if (password.type.indexOf("generated") == 0)
7878
{
79-
tooltip = this.$t("password_type_generated2");
79+
tooltip = this.$t("password_type_" + password.type);
8080
8181
tooltip += "\n" + this.$t("password_length");
8282
tooltip += " " + password.length;

0 commit comments

Comments
 (0)