[Libreoffice-commits] .: ucb/source
Tor Lillqvist
tml at kemper.freedesktop.org
Mon Oct 11 07:10:15 PDT 2010
ucb/source/ucp/gvfs/gvfs_content.cxx | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
New commits:
commit 2de8570fb07bb6225213d406a7bb2adbddbe4d36
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Mon Oct 11 17:02:03 2010 +0300
Set username/domain/password to use only if provided by user
The semantics of ucbhelper::InteractionSupplyAuthentication changed at
some point, so the getUserName(), getRealm() and getPassword() methods
now return non-empty strings only if the user actually changed them.
Check the return values for being non-empty before using them for
gnome-vfs authentication.
From gnome-vfs-authentication.diff, fixes bnc#465102.
diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx
index 121c693..ab998ac 100644
--- a/ucb/source/ucp/gvfs/gvfs_content.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_content.cxx
@@ -1645,9 +1645,17 @@ extern "C" {
ucbhelper::InteractionSupplyAuthentication > & xSupp
= xRequest->getAuthenticationSupplier();
- aUserName = xSupp->getUserName();
- aDomain = xSupp->getRealm();
- aPassword = xSupp->getPassword();
+ ::rtl::OUString aNewDomain, aNewUserName, aNewPassword;
+
+ aNewUserName = xSupp->getUserName();
+ if ( aNewUserName.getLength() )
+ aUserName = aNewUserName;
+ aNewDomain = xSupp->getRealm();
+ if ( aNewDomain.getLength() )
+ aDomain = aNewDomain;
+ aNewPassword = xSupp->getPassword();
+ if ( aNewPassword.getLength() )
+ aPassword = aNewPassword;
{
osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
More information about the Libreoffice-commits
mailing list