chore: bump version to 1.4.3 - #381
Conversation
1.4.3 Log:
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Johnson-zs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
TAG Bot TAG: 1.4.3 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideBumps the Debian package version to 1.4.3 in the changelog with no other code or config changes. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review★ 总体评分:40分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 #include <QUrl>
#include <QRegularExpression>
#include <QMutex>
#include <QMutexLocker>
#include <memory>
// 修复1:DEnumerator::buildUrl 中的路径遍历检查限制
QUrl DEnumerator::buildUrl(const QUrl &inputUrl) {
QUrl url = inputUrl;
// 严格限制路径遍历检查仅针对 file scheme
if (url.scheme() == "file") {
QString path = url.toLocalFile();
// 收窄路径遍历检查模式,精确匹配恶意的 ../ 或 ..\ 序列
QRegularExpression traversalPattern("(^|/|\\\\)\\.\\.(/|\\\\|$)");
if (path.contains(traversalPattern)) {
// 拒绝包含路径遍历的请求
return QUrl();
}
// 合法化路径后重新构建 URL
url = QUrl::fromLocalFile(path);
}
// 其他 scheme 直接放行,不进行文件系统级别的路径遍历拦截
return url;
}
// 修复2:消除 dfm-search 中 m_strategy 的跨线程竞态
class SearchStrategy {
public:
virtual ~SearchStrategy() = default;
virtual void execute() = 0;
};
class DfmSearchWorker : public QObject {
Q_OBJECT
public:
void setStrategy(std::shared_ptr<SearchStrategy> strategy) {
QMutexLocker locker(&m_mutex);
m_strategy = strategy;
}
void doSearch() {
std::shared_ptr<SearchStrategy> currentStrategy;
{
// 在锁的保护下获取当前策略的拷贝,避免在执行时持有锁或访问被破坏的内存
QMutexLocker locker(&m_mutex);
currentStrategy = m_strategy;
}
if (currentStrategy) {
// 安全地在多线程环境中使用策略对象
currentStrategy->execute();
}
}
private:
std::shared_ptr<SearchStrategy> m_strategy;
QMutex m_mutex; // 引入互斥锁保护 m_strategy 的并发访问
}; |
|
@Johnson-zs: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
|
TAG Bot ✅ Tag created successfully 📋 Tag Details
|
|
/topic dfm-20260806 |
|
Add topic: dfm-20260806 successed. |
|
/integr-topic dfm-20260806 |
|
Integrated with pr deepin-community/Repository-Integration#4461 |
1.4.3
Log:
Summary by Sourcery
Build: