From kde-core-devel Tue Apr 12 21:26:11 2011 From: "Aaron J. Seigo" Date: Tue, 12 Apr 2011 21:26:11 +0000 To: kde-core-devel Subject: Re: Review Request: Add missing KAuthorize "hooks" on KFileItemActions Message-Id: <20110412212611.23427.56381 () vidsolbach ! de> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=130264360606502 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============7980425691040532075==" --===============7980425691040532075== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/101082/#review2598 ----------------------------------------------------------- Ship it! looks good; other code using this might Do The Right Thing(tm) as well, but= it's good to centralize these checks. - Aaron J. On April 11, 2011, 12:22 p.m., Alex Fiestas wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/101082/ > ----------------------------------------------------------- > = > (Updated April 11, 2011, 12:22 p.m.) > = > = > Review request for kdelibs. > = > = > Summary > ------- > = > I found 2 places where KAuthorize should be added: > KFileItemActions::addOpenWithActionsTo(QMenu* topMenu, const QString& tra= derConstraint) > = > In this method as you can see, the first option is a QMenu pointer where = the new "open with" actions will be added. If we don't check in this functi= on if "openwith" is allowed we will end up having "Open with" action (or ha= ving to patch all apps :p) > = > The second place is: = > KFileItemActionsPrivate::slotExecuteService(QAction* act) > = > This is where the actual action is executed, just for """""security""""" = and robustness we should check here too. > = > = > Diffs > ----- > = > kio/kio/kfileitemactions.cpp 7f7d5c9 = > = > Diff: http://git.reviewboard.kde.org/r/101082/diff > = > = > Testing > ------- > = > = > Thanks, > = > Alex > = > --===============7980425691040532075== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
This is an automatically generated e-mail. To reply, visit: http://git.revie= wboard.kde.org/r/101082/

Ship it!

looks good=
; other code using this might Do The Right Thing(tm) as well, but it's =
good to centralize these checks.

- Aaron J.


On April 11th, 2011, 12:22 p.m., Alex Fiestas wrote:

Review request for kdelibs.
By Alex Fiestas.

Updated April 11, 2011, 12:22 p.m.

Descripti= on

I found 2 places where KAuthorize should be added:
KFileItemActions::addOpenWithActionsTo(QMenu* topMenu, const QString& t=
raderConstraint)

In this method as you can see, the first option is a QMenu pointer where th=
e new "open with" actions will be added. If we don't check in=
 this function if "openwith" is allowed we will end up having &qu=
ot;Open with" action (or having to patch all apps :p)

The second place is: =

KFileItemActionsPrivate::slotExecuteService(QAction* act)

This is where the actual action is executed, just for """&qu=
ot;"security""""" and robustness we should ch=
eck here too.

Diffs=

  • kio/kio/kfileitemactions.cpp (7f7d5c9)

View Diff

--===============7980425691040532075==--