138686 【KVE-2022-0805】银河麒麟桌面操作系统V10_com.kylin.backup Dbus服务删除任意文件夹

This commit is contained in:
赵民勇 2022-09-29 13:22:53 +08:00
parent 68a5346fe5
commit c844a595de
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
#include "deletebackupproxy.h"
#include <QProcess>
#include <QDateTime>
#include <QRegularExpression>
#include <QDebug>
#include "../common/utils.h"
@ -51,7 +52,7 @@ bool DeleteBackupProxy::deleteXmlBackupPoint()
m_backupPoint = parse.findBackupPointByUuid(m_backupWrapper.m_uuid);
// 删除节点
if (parse.deleteItem(m_backupWrapper.m_uuid) != ParseBackupList::SUCCESS) {
if (!m_backupWrapper.m_uuid.contains(QRegularExpression("^\\{.*-.*-.*-.*-.*\\}$")) || parse.deleteItem(m_backupWrapper.m_uuid) != ParseBackupList::SUCCESS) {
qCritical() << QString("failed to delete %1 from backuplist.xml!").arg(m_backupWrapper.m_uuid);
emit workResult(false);
return false;