Review Request: Fix sanitization of dbus path in KMainWindow

Tom Albers toma at kde.org
Tue Aug 11 12:56:01 BST 2009



> 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" );

?


- Tom


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/1261/#review1969
-----------------------------------------------------------


On 2009-08-10 22:27:09, Matthew Woehlke wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/1261/
> -----------------------------------------------------------
> 
> (Updated 2009-08-10 22:27:09)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> As pointed out by Thomas L├╝bking ( http://permalink.gmane.org/gmane.comp.kde.devel.general/58749 ), KMainWindow attempts to sanitize what it will allow in the dbus path. However as written it would allow the illegal characters "." and "-" to be passed through.
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdelibs/kdeui/widgets/kmainwindow.cpp 1009802 
> 
> Diff: http://reviewboard.kde.org/r/1261/diff
> 
> 
> Testing
> -------
> 
> built kdelibs and ran a KDE application
> 
> 
> Thanks,
> 
> Matthew
> 
>





More information about the kde-core-devel mailing list