Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass the unmodified login path to the native component instead of assuming .gpg #312

Merged
merged 1 commit into from
Nov 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ function hostAction(settings, action, params = {}) {
async function parseFields(settings, login) {
var response = await hostAction(settings, "fetch", {
storeId: login.store.id,
file: login.login + ".gpg",
file: login.loginPath,
});
if (response.status != "ok") {
throw new Error(JSON.stringify(response)); // TODO handle host error
Expand Down
6 changes: 5 additions & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,14 @@ function prepareLogins(files, settings) {
for (let storeId in files) {
for (let key in files[storeId]) {
// set login fields
const loginPath = files[storeId][key];
// remove the file-type extension
const loginName = loginPath.replace(/\.[^.]+$/u, "");
const login = {
index: index++,
store: settings.stores[storeId],
login: files[storeId][key].replace(/\.gpg$/i, ""),
login: loginName,
loginPath: loginPath,
allowFill: true,
};

Expand Down