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

--- Comment #6 from Méven <[email protected]> ---
Git commit 0228716f3e29d46fe7b68233e59e83eb6733122b by Méven Car.
Committed on 12/10/2026 at 06:49.
Pushed by meven into branch 'release/26.08'.

smb: use the saved login of a share whose url names no user

When the url of a share names no user, libsmbclient asks for credentials with
$USER, the local login. This is the case for a share added through "Add Network
Folder" without a username. KPasswdServer only gives out a saved login whose
username matches, so a password saved for another account, such as
[email protected], was never found. The password dialog came back each time the
share was opened.

The context now has an empty default user, so the authenticator sees which urls
name no user. It asks KPasswdServer without a username, which gives out the
login saved for that share. When none is saved, it tries $USER, as libsmbclient
did before.
Related: bug 520702


(cherry picked from commit 5e184072c7fa9e4770829e16fddd3fee6535578a)

Co-authored-by: Méven Car <[email protected]>

M  +1    -0    smb/autotests/CMakeLists.txt
A  +126  -0    smb/autotests/smbauthenticatortest.cpp     [License: GPL(3+eV)
GPL(v3.0) GPL(v2.0)]
M  +4    -0    smb/smbauthenticator.cpp
M  +4    -0    smb/smbcontext.cpp

https://invent.kde.org/network/kio-extras/-/commit/0228716f3e29d46fe7b68233e59e83eb6733122b

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

Reply via email to