Remove handling of privilege operation confirmation prompts from KIO::Job
ClosedPublic

Authored by chinmoyr on Feb 16 2018, 3:01 AM.

Details

Summary

Letting KIO::Job handle these prompts is pointless because an application can always choose not to show these prompts
(by connecting privilegeOperationRequested signal to an empty slot) thus compromising security.

Test Plan

All the tests in privilegejobtest pass.

Diff Detail

Repository
R241 KIO
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
chinmoyr created this revision.Feb 16 2018, 3:01 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 16 2018, 3:01 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
chinmoyr requested review of this revision.Feb 16 2018, 3:01 AM
chinmoyr edited the test plan for this revision. (Show Details)Feb 16 2018, 3:16 AM
dfaure added inline comments.Feb 16 2018, 8:36 AM
src/core/job.cpp
328 ↗(On Diff #27315)

This overwrites m_data everytime, so it might as well be a local variable.

src/core/job_p.h
92 ↗(On Diff #27315)

Is this variable really necessary? It seems to me that we'd better off without it.

chinmoyr updated this revision to Diff 27478.Feb 18 2018, 3:52 PM

removed m_data

dfaure requested changes to this revision.Mar 1 2018, 7:13 AM
dfaure added inline comments.
src/core/job.cpp
269

This feels like C code ;)

271

Either declare a var here, or return that directly (after swapping with next statement of course).

329

And here you can declare another QByteArray, more locally.

This revision now requires changes to proceed.Mar 1 2018, 7:13 AM
chinmoyr updated this revision to Diff 28539.Mar 4 2018, 4:10 AM
chinmoyr marked 3 inline comments as done.

fix issue with variable declaration

dfaure accepted this revision.Mar 4 2018, 10:19 AM
This revision is now accepted and ready to land.Mar 4 2018, 10:19 AM
This revision was automatically updated to reflect the committed changes.