[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: [Kde-pim] FB patch, version 2
From: Bo Thorsen <bo () sonofthor ! dk>
Date: 2004-09-28 11:39:07
Message-ID: 200409281339.07447.bo () sonofthor ! dk
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
[Attachment #4 (multipart/mixed)]
Hi,
Bernhard pointed out a weakness with the last patch that I also thought
of, but didn't find too much of a problem. Here is a new version of the
patch.
Can I commit to HEAD and BRANCH?
Bo.
(I can't answer in-thread, because my ISP has changed my static IP number,
so I'm not receiving any mails before the DNS changes have come through.
I'm reading the archive for answers.)
--
Bo Thorsen | Praestevejen 4
Senior Software Engineer | 5290 Marslev
Klarälvdalens Datakonsult | Denmark
["freebusymanager-domain-fix.patch" (text/x-diff)]
Index: freebusymanager.cpp
===================================================================
RCS file: /home/kde/kdepim/korganizer/freebusymanager.cpp,v
retrieving revision 1.27
diff -u -3 -p -w -r1.27 freebusymanager.cpp
--- freebusymanager.cpp 13 Sep 2004 16:01:39 -0000 1.27
+++ freebusymanager.cpp 28 Sep 2004 11:36:38 -0000
@@ -391,14 +391,20 @@ KURL FreeBusyManager::freeBusyUrl( const
return KURL();
// Cut off everything left of the @ sign to get the user name.
- QString emailName = email.left( emailpos );
+ const QString emailName = email.left( emailpos );
+ const QString emailHost = email.mid( emailpos + 1 );
// Build the URL
KURL sourceURL;
sourceURL = KOPrefs::instance()->mFreeBusyRetrieveUrl;
// Don't try to fetch free/busy data for users not on the specified servers
- if ( sourceURL.host() != email.mid( emailpos + 1 ) ) return KURL();
+ // This tests if the hostnames match, or one is a subset of the other
+ const QString hostDomain = sourceURL.host();
+ if ( hostDomain != emailHost && !hostDomain.endsWith( '.' + emailHost )
+ && !emailHost.endsWith( '.' + hostDomain ) )
+ // Host names do not match
+ return KURL();
if ( KOPrefs::instance()->mFreeBusyFullDomainRetrieval )
sourceURL.setFileName( email + ".ifb" );
[Attachment #8 (application/pgp-signature)]
_______________________________________________
kde-pim mailing list
kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic