Advice request on how to handle change in how Konqueror stores login information

Stefano Crocco stefano.crocco at alice.it
Sun Sep 22 08:10:52 BST 2024


On sabato 21 settembre 2024 14:34:57 CEST you wrote:
> One more option: Keep the old load code as a fallback to the new load
> code. You can drop the old save code, but the old load code probably
> has to be kept forever.
> 
> -Jin

This is what I thought to do at the beginning, but I realized that things 
weren't so simple. The problem is that, if a page contains two forms without 
names, it's not possible to determine which of them the old entry refers to.

For instance, suppose that the page http://xyz.com contains two forms, with id 
f1 and f2 and without a name. The form where the user should enter login 
information is f1. The old name of the KWallet entry with the login 
information is http://xyz.com#, while the new name is http://xyz.com#f1.

When Konqueror navigates to http://xyz.com, it should do the following:
- determine which forms are in the page
- look for entries http://xyz.com#f1 and http://xyz.com#f2: if it finds them, 
good: nothing else to do
- look for entry http://xyz.com#
- if the entry exists, try to decide whether it refers to form f1 and f2. This 
can be done comparing the name of the fields of each form to those stored in 
the KWallet entry.

There are two things I don't like here:
- Konqueror would look for the old entry for any page with forms, as it can't 
know whether the new key doesn't exist because the user never logged in the 
page or because it is stored in the old format
- the process of determining which form in the page the old entry refers to 
could fail in some (very unlikely, I admit) circumstances.

However, your suggestion gave me an idea which I think is a good compromise: 
use the procedure I described above but not automatically. I'll add a menu 
entry which attempts to recover login information from the old KWallet entry 
for the current page and a message box displayed on startup warning the user 
of the situation and informing him of the new menu entry.

Thanks for the suggestion

Stefano




More information about the kde-devel mailing list