Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
System
KPMCore
Commits
81a5eae6
Commit
81a5eae6
authored
Feb 05, 2022
by
Andrius Štikonas
Browse files
Restrict CopyFileData to writing to already existing files.
parent
3903ae1b
Pipeline
#133419
passed with stage
in 4 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/util/externalcommandhelper.cpp
View file @
81a5eae6
...
...
@@ -179,6 +179,11 @@ QVariantMap ExternalCommandHelper::CopyFileData(const QString& sourceDevice, con
return
{};
}
// Only allow writing to existing files.
if
(
!
std
::
filesystem
::
exists
(
targetPath
))
{
return
{};
}
QVariantMap
reply
;
reply
[
QStringLiteral
(
"success"
)]
=
true
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment