Skip to content

Commit

Permalink
Fix #234: possible injection through .arg() chains
Browse files Browse the repository at this point in the history
  • Loading branch information
zjeffer committed Jan 17, 2025
1 parent b066fc7 commit 517c607
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/dbmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2502,9 +2502,8 @@ void DBManager::exportNotes(const QString &baseExportPath, const QString &extens
counter = 1;
while (directory.exists(filePath)) {
filePath = QStringLiteral("%1%2%3 %4%5")
.arg(notePath, QDir::separator(), safeTitle)
.arg(counter++)
.arg(extension);
.arg(notePath, QDir::separator(), safeTitle,
QString::number(counter++), extension);
}

// qDebug() << "Exporting note:" << filePath;
Expand Down

0 comments on commit 517c607

Please sign in to comment.