https://bugs.kde.org/show_bug.cgi?id=491898
--- Comment #12 from [email protected] --- Submitted a fix as a merge request: [https://invent.kde.org/frameworks/kwallet/-/merge_requests/153] (frameworks/kwallet -> master) Root cause (confirmed from source): in src/runtime/kwallet-query/src/querydriver.cpp, QueryDriver::writeValue() selects the write method from theWallet->entryType(entryName). For an entry that does not exist yet, entryType() returns Wallet::Unknown, so neither the Wallet::Password nor the Wallet::Map branch runs -- no write is issued, yet the tool still calls quit() and exits 0. That is why "kwallet-query -w" on a NEW key silently does nothing while overwriting an existing key works, and why a direct org.kde.kwalletd6 writePassword() D-Bus call persists correctly (it has no such type gate). The fix defaults a new (Unknown) entry to a Password write, matching writePassword(). It also: fails with a non-zero exit instead of reporting a phantom success when the entry is an unwritable pre-existing type or the map input is invalid JSON, and creates the target folder on demand rather than dropping the write when the folder does not exist yet. Tested on Oracle Linux 10 (kf6-kwallet 6.18.0): rebuilt the package with the patch and ran a functional suite against a real kwalletd6 -- a new-entry write now persists and reads back, while the stock build reproduces the loss. Existing-entry overwrite, on-demand folder creation, map JSON writes, and the invalid-JSON error path are all exercised. Reproduced independently on Debian too, so it is not distro/FIPS-specific. Likely the same underlying issue as bug 509397 and bug 501233 (and Ubuntu LP #2122626). -- You are receiving this mail because: You are watching all bug changes.
