ブログ Engineering

Making Imported Custom Fields Editable in Passman

英語の記事. Custom fields imported into Passman showed up but couldn't be edited. The merged fix stores a field type on import and backfills it for existing entries.

JavaScriptnextcloud/passmanAngularJSCSV importdata migration

A nine-year-old bug where imported data was visible but not editable.

短い答え

Custom fields imported into Passman, for example through the generic CSV importer, appeared when viewing a credential, but showed no values or types on the edit screen. The imported fields had no field_type. The fix has importers store one (text or password, based on the secret flag), and the edit controller backfills a valid type for already-stored fields that lack one. It was merged as PR #877 and closed issue #365.

The problem

Issue #365, opened in August 2017, described exporting passwords from Revelation, importing them with the generic CSV importer, and finding that custom fields "appear but with no values or types visible" on the edit screen.

The fix

Importers now set the type explicitly, for example:

'secret': isSecret,
'field_type': (isSecret === 1) ? 'password' : 'text'

The edit controller repairs existing data on load:

var applyMissingCustomFieldTypes = function (credential) {
    ...
    if (field.value !== null && angular.isObject(field.value) && field.value.filename !== undefined) {
        field.field_type = 'file';
    } else {
        field.field_type = (field.secret === true || field.secret === 1 || field.secret === '1') ? 'password' : 'text';
    }
    ...
};

By the numbers

  • Repository: nextcloud/passman, 829 stars (Nov 3, 2026), JavaScript, AGPL-3.0
  • Files changed: 5
  • Lines: +29 / -8
  • Commits: 1
  • Opened: Aug 21, 2026. Merged: Aug 24, 2026. Time to merge: 2 days, 22 hours
  • Review: approved and merged by the maintainer

How the review went

The maintainer approved and merged the PR without requesting changes.

よくある質問

Do I need to re-import my data?

The edit controller backfills a missing field type when a credential is opened for editing, so existing imported fields become editable without re-importing.

Where can I read more?

See the pull request and the original issue.

目標

Fixing the writer stops new bad data, and backfilling in the reader repairs the old. Doing both closes the bug for everyone, not just new imports.

ループを実行

本番環境のシグナルをレビュー済みの修正に変える。

無料トライアルで、Prilog が実際のインシデントをコードレベルの Pull Request に結びつける方法をご確認ください。