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

            Bug ID: 465405
           Summary: Case mismatch in KWallet Map vs. SMTP configuration
                    causes constant re-authentication with G-mail
    Classification: Applications
           Product: kmail2
           Version: 5.22.2
          Platform: Archlinux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kdepim-b...@kde.org
          Reporter: holyfo...@gmail.com
  Target Milestone: ---

SUMMARY
=========
The scenario is XOAUTH2 with a G-mail account, although it may apply in other
use cases.

If the "login" (e-mail address) entered in SMTP (Sending) configuration
contains uppercase characters, the look-up in KWallet to find the key/value
pair to retrieve the existing oauth token will fail, as it's always stored all
lowercase inside the wallet.  Thus, every time you attempt to send an e-mail,
you will always be redirected to Google to authorize a new token, as your
system doesn't think you yet have one.  Ironically, the previous token will be
successfully overwritten by the new one.

Receiving e-mails seems to be unaffected by case mismatch (configuration vs.
wallet).

I suggest the issue is some degree more of a bug than user misconfiguration, as
the "Add Account" wizard asks for your e-mail address (which you may supply as
f...@gmail.com, for example, noting the capital "F") and it'll proceed to
automate setup for you seemingly without compliant, despite then experiencing
this issue. 

I assume being able to enter capital letters isn't the core issue, either. The
solution may be more closely attached to how KMail, Akonadi, and Wallet are
spec'ed to interact. As a sidenote, I tried adding the same G-mail account to
my client multiple times in various casing (co-existing), and started to have
some strange effects that should likely be it's own issue if found warranted
after further review.


STEPS TO REPRODUCE
==================
1. XOAUTH2 with a SMTP configuration containing an uppercase character in the
login (manual setup or Add Account wizard).
2. Try to send an e-mail.
3. Notice redirection to Google to authorize a new token on every send, even if
you already have one.


OBSERVED RESULT
================
Doesn't fetch token from Wallet seemingly due to case mismatch.


EXPECTED RESULT
===============
Retrieve existing token from Wallet.


SOFTWARE/OS VERSIONS
=====================
Linux/KDE Plasma: 6.1.9-arch1-1
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8


ADDITIONAL COMMENTARY
=======================
I'm extremely new to enjoying KDE, so my observations on the issue are best
novice effort.  Also please note, should you test "case swapping", be sure to
clear Akonadi Cache between settings changes to ensure effect is taken.
Otherwise I assume some layer of the system feels no actual change occurred
when only the case was changed, and you'll not immediately see the result.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to