Commit 00d2d934 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Protect users from themselves and from non-existant pdf trojan files

svn path=/trunk/kdegraphics/kpdf/; revision=346532
parent 7cd6f373
...@@ -717,6 +717,8 @@ Part::executeAction(LinkAction* action) ...@@ -717,6 +717,8 @@ Part::executeAction(LinkAction* action)
} }
else else
{ {
KMessageBox::information(widget(), i18n("The pdf file is trying to execute an external application and for your safety kpdf does not allow that."));
/* core developers say this is too dangerous
fileName = fileName->copy(); fileName = fileName->copy();
if (((LinkLaunch *)action)->getParams()) if (((LinkLaunch *)action)->getParams())
{ {
...@@ -727,7 +729,7 @@ Part::executeAction(LinkAction* action) ...@@ -727,7 +729,7 @@ Part::executeAction(LinkAction* action)
if (KMessageBox::questionYesNo(widget(), i18n("Do you want to execute the command:\n%1").arg(fileName->getCString()), i18n("Launching external application")) == KMessageBox::Yes) if (KMessageBox::questionYesNo(widget(), i18n("Do you want to execute the command:\n%1").arg(fileName->getCString()), i18n("Launching external application")) == KMessageBox::Yes)
{ {
system(fileName->getCString()); system(fileName->getCString());
} }*/
delete fileName; delete fileName;
} }
break; break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment