博客 Engineering

Unsticking Passman's Import From the Nextcloud Passwords App

英文文章. Importing a Nextcloud Passwords CSV into Passman stalled at the last row. The merged fix maps the current CSV columns and skips unlabeled rows.

JavaScriptnextcloud/passmanCSV importpassword managersdata migration

An importer written for an older export format, updated for the current one, then extended by the maintainer.

简短回答

Importing a CSV exported from the Nextcloud Passwords app into Passman stopped at "135/136" and never finished. The importer read columns from the Passwords app's legacy format. The fix maps the current columns (label, username, password, notes, url) with fallbacks to the old ones, skips rows without a label, and updates the in-app export instructions. A maintainer then added tag parsing, custom-field handling and edited-timestamp support. It was merged as PR #875 and closed issue #870.

The problem

Issue #870, on Nextcloud 34.0.1, followed the Passwords app's "Backup or export" flow to a Predefined CSV, then imported it with Passman's "Passwords App csv" importer. The output showed "File read." and "Read progress 135/136", and the import never progressed.

The fix

var username = row.username || '';
var label = row.label || PassmanImporter.join_([row.website, username], ' - ');
var _credential = PassmanImporter.newCredential();
_credential.label = label;
_credential.username = username;
_credential.password = row.password || '';
_credential.url = row.url || row.fulladdress || '';
_credential.description = row.notes || '';

if (label) {
    credential_list.push(_credential);
}

By the numbers

  • Repository: nextcloud/passman, 829 stars (Nov 3, 2026), JavaScript, AGPL-3.0
  • Files changed: 1
  • Lines: +103 / -10 (the PR author's commit was +13 / -9; the maintainer's enhancement commit was +89)
  • Commits: 4 (1 from the PR author, 3 from the maintainer, including a merge of master)
  • Opened: Aug 21, 2026. Merged: Aug 24, 2026. Time to merge: 3 days, 1 hour
  • Review: one suggestion, then approved and merged by the maintainer

How the review went

The maintainer suggested one wording change to the export instructions, pointing users to "Backup and Restore" rather than Settings, and committed it. They then added a larger commit: "enhance OCPasswords importer with tag parsing, custom fields handling, and edited timestamp support", and merged the PR.

常见问题解答

Do old Passwords app exports still work?

The importer falls back to the legacy website and fulladdress columns when the newer ones are missing.

Where can I read more?

See the pull request and the original issue.

目标

Importers rot quietly as other apps change their export formats. Mapping both the current and legacy columns lets users move their passwords without editing a CSV by hand.

运行闭环

把生产信号转化为已审查的修复。

开始免费试用,了解 Prilog 如何把真实事故映射到代码级 Pull Request。