[Okular-devel] [okular] [Bug 339170] Remember encryption passwords

MarkW mwutzke at outlook.com
Fri Feb 6 23:18:46 UTC 2015


https://bugs.kde.org/show_bug.cgi?id=339170

--- Comment #7 from MarkW <mwutzke at outlook.com> ---
I also suffer the same issue. But I have 2 systems, one where passwords are
being saved, and another where passwords are not being saved.

Here are the system details:
Okular 0.19.3 / KDE 4.13.3 - allows for storage / retrieve in KWallet
Okular 0.20.0 / KDE 4.14.1 - does not store / retrieve from KWallet
origin/master (v14.12.2-18-g24006bb) also fails in the same way

On both system, I do have KWallet enabled, and it is working.

Doing some debug, here is my analysis:
  - KWallet will be used in Part::doOpenFile if walletKey.isNull() != NULL (in
my case it is NULL)
  - walletKey should be setup by m_document->walletDataForFile()
  - In Document::walletDataForFile, d->m_generator == NULL, so nothing gets set
  - Rolling back the anaylsis...
  - Before m_document->walletDataForFile() is called,
m_document->openDocument() will be called
  - Document::openDocument() calls d->openDocumentInternal()
  - DocumentPrivate::openDocumentInternal() does setup m_generator, but as
DocumentPrivate::openDocumentInternal() can't open the file (it is password
protected, but we don't have a valid password yet), this routine will fail
  - as part of the cleanup during failure processing,
DocumentPrivate::openDocumentInternal() will set m_generator = 0, but it is
this m_generator that is required later to access KWallet

I have coded the one line code change to remove setting 'm_generator = 0;' and
okular / KWallet integration is working correctly.

I've added my patch to work-around (fix?) the issue.

But, what are the implications of removing 'm_generator = 0;' from
DocumentPrivate::openDocumentInternal() ? Though it does solve the immediate
problem - but are there other issues that could be introduced ?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list