jtamate added inline comments.


> elvisangelaccio wrote in kioexecd.cpp:65
> The problem with using `QDir::removeRecursively()` is that the folder we are 
> going to delete recursively is an input from dbus. What happens if some 
> malicious software calls `watch("~/dummy.txt")` ?
> At the very least we need to check whether this folder starts with 
> `QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + 
> QStringLiteral("/krun")` (the path used by `kioexec`).

There is a slightly problem:  QStandardPaths::CacheLocation is application 
dependent, and their values doesn't match here:
kioexec: /home/jtorres/.cache/kioexec/
kioexecd: /home/jtorres/.cache/kiod5/
Can we assume that replacing kiod5 by kioexec will always work?

We could use QStandardPaths::GenericCacheLocation instead, but this is not 
guaranteed to be non empty.

Or another solution: keep it as it was (delete only the file and the directory 
if it is possible).

> anthonyfieroni wrote in kioexecd.cpp:85-88
> Now it's not needed 'remove' will do the work

You're right. In this case it isn't possible to be notified of a file creation 
unless it has been deleted first.

  R241 KIO


To: jtamate, #frameworks, broulik, ngraham, dfaure, elvisangelaccio
Cc: anthonyfieroni, elvisangelaccio, kde-frameworks-devel, michaelh, ngraham, 

Reply via email to