Skip to content

Commit

Permalink
Incrementing version to 4.0
Browse files Browse the repository at this point in the history
The MV3 migration contains so many moving parts it probably has a higher risk of rollback problems than normal, so despite the lack of visual fanfare it's probably worthy of a major version bump.
  • Loading branch information
luckyrat committed May 24, 2024
1 parent dc3a7c1 commit 5b44148
Show file tree
Hide file tree
Showing 18 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@
"message": "Always save new entries here",
"description": "Description of checkbox that when enabled will change a setting such that the user is not prompted where to save future entries they create."
},
"list_version_upgrade_3_12": {
"list_version_upgrade_4_0": {
"message": "Support for the latest web browsers (MV3);Faster connection to KeePass on some systems (requires KeePassRPC.plgx v2+);Lots of bug fixes and probably some new bugs introduced",
"description": "Changes for the version number in the string key name. Multiple items MUST be separated by a semicolon (;). Do not use a semi-colon except as a list-item (new line) separator."
},
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "kee-browser-addon",
"displayName": "Kee - Password Manager",
"description": "Kee adds private, secure and easy password management features which save time and keep your private data more secure.",
"version": "3.12.0",
"version": "4.0.0",
"type": "module",
"devDependencies": {
"@ffflorian/jszip-cli": "^3.6.3",
Expand Down
4 changes: 2 additions & 2 deletions src/background/KF.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ class Kee {
}

updateKeePassDatabases(newDatabases: Database[]) {
//TODO:4: To improve performance we might need to determine if anything
//TODO:5: To improve performance we might need to determine if anything
// has actually changed before doing the dispatches and poking the
// current tab frames to find entries
let newDatabaseActiveIndex = -1;
Expand Down Expand Up @@ -508,7 +508,7 @@ class Kee {

private refreshFormStatus(action: Action) {
this.tabStates.forEach((ts, tabId) => {
//TODO:4: This should be equivalent but much faster than testing in the inner
//TODO:5: This should be equivalent but much faster than testing in the inner
// loop. Unless tabId does not equal port.sender.tab.id?
//if (tabId !== this.foregroundTabId) return;

Expand Down
2 changes: 1 addition & 1 deletion src/common/ConfigManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export class ConfigManager {
if (nextPage) configString += nextPage;
}
if (configString) this.current = JSON.parse(configString);
//TODO:4: Delete the old keefox prefixed data to save space
//TODO:5: Delete the old keefox prefixed data to save space
}
}
this.fixInvalidConfigData();
Expand Down
2 changes: 1 addition & 1 deletion src/common/DefaultSiteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defaultSiteConfig.pageRegex = new SiteConfigLookup();

defaultSiteConfig.pageRegex["^.*$"] = {
config: {
/* TODO:4: ? In future we can give finer control of form rescanning behaviour from here
/* TODO:5: ? In future we can give finer control of form rescanning behaviour from here
rescanDOMevents:
[{
Expand Down
2 changes: 1 addition & 1 deletion src/common/IPCPiniaPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Mutation } from "../store/Mutation";
export function IPCPiniaPlugin() {
return {
distributeAction: (mutation: Mutation) => {
//TODO:4: Find a way to more efficiently distribute Pinia Patch objects / Vue3 Proxy objects without this additional JSON mapping / manipulation
//TODO:5: Find a way to more efficiently distribute Pinia Patch objects / Vue3 Proxy objects without this additional JSON mapping / manipulation
const json = JSON.stringify(mutation);
KeeLog.debug("New non-background mutation/action going to be distributed.");
Port.postMessage({ mutation: JSON.parse(json) } as AddonMessage);
Expand Down
2 changes: 1 addition & 1 deletion src/common/model/Entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class Entry {

// How relevant this entry is to the current form in
// the browser - transient (not stored in KeePass)
//TODO:4 put all match data into a new object?
//TODO:5 put all match data into a new object?
relevanceScore: number;
lowFieldMatchRatio: any;
formIndex: number;
Expand Down
2 changes: 1 addition & 1 deletion src/common/model/EntrySummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class EntrySummary {
uuid: string;
dbFileName: string;
relevanceScore: number;
fullDetails?: Entry; //TODO:4: remove circular reference by maintaining independent Entry lookup by uuid?
fullDetails?: Entry; //TODO:5: remove circular reference by maintaining independent Entry lookup by uuid?
isPreferredMatch?: boolean;

constructor(e: Partial<EntrySummary>) {
Expand Down
2 changes: 1 addition & 1 deletion src/common/model/Locator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ export class Locator {
this.autocompleteValues = locator.autocompleteValues;
}

//TODO:4: Things like MaxLength that can be used to both help identify the field and generate new values/passwords
//TODO:5: Things like MaxLength that can be used to both help identify the field and generate new values/passwords
}
24 changes: 12 additions & 12 deletions src/page/formFilling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export class FormFilling {
private calculateFieldMatchScore(
matchedField: MatchedField,
dataField: Field,
_currentPage, //TODO:4: remove param
_currentPage, //TODO:5: remove param
config: FieldMatchScoreConfig,
isVisible?: boolean
) {
Expand Down Expand Up @@ -359,7 +359,7 @@ export class FormFilling {
domElement.value = value;
}

//TODO:4: Investigate and document why we're not using data attributes to store this string in the DOM
//TODO:5: Investigate and document why we're not using data attributes to store this string in the DOM
(domElement as any).keeInitialDetectedValue = value;

domElement.dispatchEvent(
Expand Down Expand Up @@ -437,7 +437,7 @@ export class FormFilling {
}

private initMatchResult(behaviour: FindMatchesBehaviour) {
//TODO:4: #6 create new object might cause issues with multi-page or submit behaviour? if not, this would be neater:
//TODO:5: #6 create new object might cause issues with multi-page or submit behaviour? if not, this would be neater:
// matchResult = new MatchResult();
this.matchResult.UUID = "";
this.matchResult.entries = [];
Expand Down Expand Up @@ -683,7 +683,7 @@ export class FormFilling {
offsetParent: true, // This tricks element visibility checks into treating this as visible to the user
addEventListener: function () {
return;
}, //TODO:4: hook up to the submit function to simulate real form submission
}, //TODO:5: hook up to the submit function to simulate real form submission
removeEventListener: function () {
return;
}
Expand Down Expand Up @@ -728,7 +728,7 @@ export class FormFilling {
// form and entry combination. We could be more efficient for the common case of 1 form
// by avoiding the clone then but keeping the same behaviour gives us a higher chance
// of noticing bugs.
matchResult.entries[i] = JSON.parse(crString); //TODO:4: faster clone? https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/The_structured_clone_algorithm ?
matchResult.entries[i] = JSON.parse(crString); //TODO:5: faster clone? https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/The_structured_clone_algorithm ?

// Nothing to do if we have no matching entries available.
if (matchResult.entries[i].length == 0) continue;
Expand Down Expand Up @@ -1013,7 +1013,7 @@ export class FormFilling {
}

if (matchingLogin != null) {
//TODO:4: #6 multi-page
//TODO:5: #6 multi-page
// // record / update the info attached to this tab regarding
// // the number of pages of forms we want to fill in
// // NB: we do this even if we know this is a single form
Expand All @@ -1034,7 +1034,7 @@ export class FormFilling {
// }

// // If the user manually requested this to be filled in or the current page is unknown
// if (!automated)//TODO:4: #6 multi-page || tabState.currentPage <= 0)
// if (!automated)//TODO:5: #6 multi-page || tabState.currentPage <= 0)
// {
// let maximumPageCount = 1;
// for (let i = 0; i < matchingLogin.passwords.length; i++)
Expand All @@ -1049,7 +1049,7 @@ export class FormFilling {
// if (otherField.formFieldPage > maximumPageCount)
// maximumPageCount = otherField.formFieldPage;
// }
// //TODO:4: #6: multi-page
// //TODO:5: #6: multi-page
// // // always assume page 1 (very rare cases will go wrong - see github KeeFox #411 for relevant enhancement request)
// // // Possible regression since v1.4: We used to ignore currentPage entirely for the first
// // // page of a submission, now we might try to give preference to page 1 fields (though total
Expand Down Expand Up @@ -1142,7 +1142,7 @@ export class FormFilling {

// If this form fill is the non-final page of a multi-page login process we record the
// UUID and dbFilename. We also enable auto-submit in some circumstances
//TODO:4: #6: multi-page
//TODO:5: #6: multi-page
// if (matchResult.UUID != undefined && matchResult.UUID != null && matchResult.UUID != "")
// {
// if (tabState.currentPage > 0 && tabState.currentPage < tabState.maximumPage)
Expand Down Expand Up @@ -1415,7 +1415,7 @@ export class FormFilling {
candidate.score += distanceFactor * distanceScore;
});

//TODO:4: more accurate searching of submit buttons, etc. to avoid password resets if possible
//TODO:5: more accurate searching of submit buttons, etc. to avoid password resets if possible
// maybe special cases for common HTML output patterns (e.g. javascript-only ASP.NET forms)

let maxScore = submitElements[0].score;
Expand All @@ -1435,7 +1435,7 @@ export class FormFilling {
semanticWhitelistCache,
semanticBlacklistCache
) {
//TODO:4: other languages
//TODO:5: other languages
const goodWords = [
"submit",
"login",
Expand Down Expand Up @@ -1580,7 +1580,7 @@ export class FormFilling {
form.submit();
}

//TODO:4: maybe something like this might be useful? Dunno why a click()
//TODO:5: maybe something like this might be useful? Dunno why a click()
// above wouldn't be sufficient but maybe some custom event raising might be handy...
/*
function simulateClick() {
Expand Down
8 changes: 4 additions & 4 deletions src/page/formSaving.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class FormSaving {
private Logger: KeeLogger;
private formUtils: FormUtils;
private SubmitHandlerAttachments: SubmitHandlerAttachment[] = [];
private matchResult: MatchResult; //TODO:4: May be overkill to have all this data available for saving
private matchResult: MatchResult; //TODO:5: May be overkill to have all this data available for saving

constructor(private myPort: chrome.runtime.Port, logger: KeeLogger, formUtils: FormUtils) {
this.Logger = logger;
Expand Down Expand Up @@ -53,7 +53,7 @@ export class FormSaving {
// This won't always be called before all event handlers on the web page so on
// some sites we will store invalid data (in cases where the login scripts
// mangle the contents of the fields before submitting them).
//TODO:4: Possibly could slightly reduce incidence of this problem by listening
//TODO:5: Possibly could slightly reduce incidence of this problem by listening
// to every click on the document body or tracking all input events but performance?
private submitHandler(_e: Event, form: HTMLFormElement) {
this.Logger.debug("submitHandler called");
Expand Down Expand Up @@ -107,7 +107,7 @@ export class FormSaving {

for (let i = 0; i < passwords.length; i++) passwordFields.push(passwords[i]);

//TODO:4: try to distinguish between multi-password login/signup and typo. maybe: if username exists and matches existing password it is a typo, else multi-password
//TODO:5: try to distinguish between multi-password login/signup and typo. maybe: if username exists and matches existing password it is a typo, else multi-password
//return;
} // it's probably a password change form, but may be a sign-up form
else {
Expand All @@ -123,7 +123,7 @@ export class FormSaving {
// if there are only two passwords we already know that they match
if (passwords.length == 2) {
passwordFields.push(passwords[0]);
//TODO:4: it is also reasonably likely that this indicates a
//TODO:5: it is also reasonably likely that this indicates a
// sign-up form rather than a password change form. decide
// which here and flag which one it is. for now, we just assume
// it's a sign-up form becuase that is more useful for the user in many cases
Expand Down
4 changes: 2 additions & 2 deletions src/page/formsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ export class FormUtils {
// Work out which DOM form element is most likely to be the username field.
// This information is only used to display the username to the user so an inaccurate
// choice won't impact the form detection or filling behaviour.
//TODO:4: Extend this to inspect more than just the name of the field. E.g. max length?
//TODO:4: For form filling (not submitting) we might want to select based upon found data in KeePass?
//TODO:5: Extend this to inspect more than just the name of the field. E.g. max length?
//TODO:5: For form filling (not submitting) we might want to select based upon found data in KeePass?
if (firstPossibleUsernameIndex != -1) usernameIndex = firstPossibleUsernameIndex;
else if (firstPasswordIndex > 0) usernameIndex = firstPasswordIndex - 1;
this.Logger.debug("usernameIndex: " + usernameIndex);
Expand Down
2 changes: 1 addition & 1 deletion src/panels/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async function start() {
store.$patch(m.initialState);
vueApp.mount("#main");

//TODO:4: Could be done earlier to speed up initial rendering?
//TODO:5: Could be done earlier to speed up initial rendering?
Port.postMessage({
action: Action.GetPasswordProfiles
});
Expand Down
2 changes: 1 addition & 1 deletion src/panels/mainLegacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function updateFrameState(newState: FrameState) {
}

function closePanel() {
//TODO:4: Might want more fine-grained closing in future
//TODO:5: Might want more fine-grained closing in future
Port.postMessage({ action: Action.CloseAllPanels });
}

Expand Down
2 changes: 1 addition & 1 deletion src/popup/components/Save1stParty.vue
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export default {
...originalField,
value: change.value
});
//TODO:4: faster deep clone
//TODO:5: faster deep clone
const newFields = JSON.parse(
JSON.stringify(updatedSaveState.newEntry.fields)
) as Field[];
Expand Down
6 changes: 3 additions & 3 deletions src/release-notes/update-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<link href="/assets/styles/bootstrap.min.css" type="text/css" rel="stylesheet">
<link rel="stylesheet" href="/assets/styles/release-notes.css"/>
<title>Kee 3.12</title>
<title>Kee 4.0</title>
<link rel="icon" href="/assets/images/64.png"/>
<style>
.showIfBeta {
Expand All @@ -19,11 +19,11 @@
<body class="container" style="max-width: 900px;">
<div id="i18n_root" style="align-items: stretch;">

<h1 style="font-size: 42px; text-align: center;"><img src="/assets/images/64.png" style="margin-bottom: 4px; margin-right: 10px;" /><span data-i18n="welcome_to_kee"></span> 3.12</h1>
<h1 style="font-size: 42px; text-align: center;"><img src="/assets/images/64.png" style="margin-bottom: 4px; margin-right: 10px;" /><span data-i18n="welcome_to_kee"></span> 4.0</h1>
<div id="mainContent">
<div id="updateNotesContent">

<h2 style="margin-left:15px"><span data-i18n="version_upgrade_heading_changes"></span> 3.12</h2>
<h2 style="margin-left:15px"><span data-i18n="version_upgrade_heading_changes"></span> 4.0</h2>

<p data-i18n="list_version_upgrade_3_12"></p>

Expand Down
2 changes: 1 addition & 1 deletion src/typedefs/kee.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {Kee} from "../background/KF";

declare global {
interface Window {
//TODO:4: See if it is possible to manage the persistent
//TODO:5: See if it is possible to manage the persistent
// external connection, cross-process messaging and our
// in-memory caches without a global var in MV3
kee: Kee;
Expand Down

0 comments on commit 5b44148

Please sign in to comment.