[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Review Request: Fix sanitization of dbus path in KMainWindow
From:       Chani <chanika () gmail ! com>
Date:       2009-08-11 16:29:32
Message-ID: 200908110929.32953.chanika () gmail ! com
[Download RAW message or body]


On August 11, 2009 05:55:54 Thiago Macieira wrote:
> Em Terça-feira 11 Agosto 2009, às 13:56:01, Tom Albers escreveu:
> > > On 2009-08-11 05:23:13, Chani wrote:
> > > > how will this affect applications that do have a - in their name? and
> > > > applications that use the dbus interface of those apps?
> > >
> > > thomasl wrote:
> > >     As a dbus path attempt of "/some-app/MainWindow_1" is catched by an
> > > assertion in Qt (for being invalid) there's never been a chance that
> > > you used it this way
> > >
> > >     If we'd however catch the appName in KAboutData to align the dbus
> > > path with e.g. qApp->applicationName(), this would -likely- affect at
> > > least the KConfig rc path and possibly the way it registers with
> > > KGlobalAction :-(
> > >
> > >     (if anyone wonders, i had of course a much cooler "." in my failing
> > > app ;-)
> > >
> > >     As the limitiation of the appName would be artificial, one could
> > > also choose to change the dbus path system of KMainWindow to e.g.
> > > "/MainWindows/MainWindow_1", "/MainWindows/MainWindow_2", etc. - but
> > > that would break everything here :-(
> >
> > Concrete question: will:
> >
> >  QDBusInterface dbus( "org.kde.plasma-desktop", "/App" );
> >
> > change into
> >
> >  QDBusInterface dbus( "org.kde.plasmadesktop", "/App" );
> >
> > ?
> 
> No.
> 
> You're mixing interfaces and services. You can have dashes in service
>  names, so org.kde.plasma-desktop is perfectly valid:
> 
> $ qdbus org.kde.plasma-desktop
> /
> /App
> /KBookmarkManager
> /KBookmarkManager/kfilePlaces
> /KIO
> /KIO/Scheduler
> /MainApplication
> /kickoff
> /kickoff/RecentAppDoc
> 
> However, you cannot have dashes in interface names:
> 
> $ qdbus org.kde.plasma-desktop /MainApplication
> Invalid D-BUS interface name 'org.kde.plasma-desktop.PlasmaApp' found while
> parsing introspection
> 
> You cannot construct a QDBusInterface object with that interface name. Even
>  if you could, the interface cannot be called because the bus will reject
>  such messages. If you try, you'll get disconnected.
> 
> That interface name is auto-created by QtDBus itself and should be fixed
>  there.
> 

oh btw, I've been wondering about this for a while... nobody else seems to 
have a problem with "kquitapp plasma-desktop", but for the last few months 
it's only worked for me on every third try.
literally, every third one works. it's *weird*. I've always wondered if it had 
something to do with the dash.

-- 
This message brought to you by eevil bananas and the number 3.
www.chani3.com

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic