keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
21.39k stars 1.48k forks source link

KeepassXC crashes during export as *.xml #11365

Closed sahriVoraus closed 1 month ago

sahriVoraus commented 1 month ago

Overview

I tried to export my data base as *.xml file to have a backup in Bitwarden. When the export is started KeepassXC just crashes and the export files is not created.

Steps to Reproduce

  1. Open Database
  2. Click Database > Export > XML-File
  3. Approve
  4. Select Path and File Name and click Save

Expected Behavior

An xml File with the content should be created

Actual Behavior

Program crashes and no export is generated

Context

-

KeePassXC - Version 2.8.0-snapshot Build-Typ: Snapshot Revision: 740994e

Qt 5.15.11 Diagnosemodus ist deaktiviert.

Betriebssystem: Windows 11 Version 2009 CPU-Architektur: x86_64 Kernel: winnt 10.0.22631

Aktivierte Erweiterungen:

Kryptographische Bibliotheken:

droidmonkey commented 1 month ago

Oh fun, reproducible but luckily its just an assert hit so it won't impact release builds.

https://github.com/keepassxreboot/keepassxc/blob/02881889d5b3dc533b8afafa47c0b0ac8054f2c1/src/format/KdbxXmlWriter.cpp#L32-L38

Looks like we don't properly initialize the writer, need to give it an index map for the attachments.