Review Request: Fix sanitization of dbus path in KMainWindow (take 2)

Matthew Woehlke mw_triad at
Tue Aug 18 20:46:12 BST 2009

Thiago Macieira wrote:
> Em Terça-feira 18 Agosto 2009, às 18:34:18, você escreveu:
>> As pointed out by Thomas Lübking (
>> ),
>>  KMainWindow attempts to sanitize what it will allow in the dbus path. This
>>  fixes it to only allow legal characters in the entire path (including the
>>  part from appName). Using QChar::isLetter and related allows non-ASCII, so
>>  we need our own validation function (this one in fact comes from
>>  qdbusutil.cpp).
> Patch makes sense. Ship it.
> The only cosmetic change I would make is to name the function 
> "isValidDBusObjectPathCharacter".

That's fine. Committed, with this change.

>> built, ran kcalc
> KCalc wouldn't show the issue.

I don't have Kaleo source on this machine (which is where this was
originally spotted). I used KCalc as a KMainWindow user to check that
the code doesn't eat babies when run. It's admittedly not a very
thorough test, but in theory there is no code out there that broke
before and is now fixed.

Please do not quote my e-mail address unobfuscated in message bodies.
Cannot read .sig now

More information about the kde-core-devel mailing list