Skip to content

Commit 410d33c

Browse files
committed
Fix #234: possible injection through .arg() chains
1 parent b9d5d50 commit 410d33c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/dbmanager.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -2502,9 +2502,8 @@ void DBManager::exportNotes(const QString &baseExportPath, const QString &extens
25022502
counter = 1;
25032503
while (directory.exists(filePath)) {
25042504
filePath = QStringLiteral("%1%2%3 %4%5")
2505-
.arg(notePath, QDir::separator(), safeTitle)
2506-
.arg(counter++)
2507-
.arg(extension);
2505+
.arg(notePath, QDir::separator(), safeTitle,
2506+
QString::number(counter++), extension);
25082507
}
25092508

25102509
// qDebug() << "Exporting note:" << filePath;

0 commit comments

Comments
 (0)