Skip to content

fix: 移除硬编码的公网 url#191

Merged
zhaohuiw42 merged 1 commit into
linuxdeepin:masterfrom
KT-lcz:master
Jul 10, 2025
Merged

fix: 移除硬编码的公网 url#191
zhaohuiw42 merged 1 commit into
linuxdeepin:masterfrom
KT-lcz:master

Conversation

@KT-lcz
Copy link
Copy Markdown
Contributor

@KT-lcz KT-lcz commented Jul 8, 2025

No description provided.

移除硬编码的公网 url

Log: 移除硬编码的公网 url
Bug: https://pms.uniontech.com/bug-view-321337.html
Influence: 安全基线
@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

代码审查意见:

  1. dstore.go文件中,GetMetadataServer函数返回一个错误,但没有处理这个错误。应该添加错误处理逻辑,例如记录日志或返回错误信息给调用者。

  2. mirrors.go文件中,LoadMirrorSources函数中使用了硬编码的默认URL,建议使用配置文件或环境变量来设置默认URL,以提高代码的可配置性和可维护性。

  3. system.go文件中,DefaultMirrorsUrl常量被移除,但在mirrors.gosystem_apt.go文件中仍然使用了这个常量。应该更新这些文件,以避免使用已移除的常量。

  4. system_apt.go文件中,DetectDefaultRepoInfo函数被移除,但在mirrors.go文件中仍然使用了这个函数。应该更新mirrors.go文件,以避免使用已移除的函数。

  5. updateplatform/message_report.go文件中,NewUpdatePlatformManager函数中硬编码了URL,建议使用配置文件或环境变量来设置URL。

  6. lastore-smartmirror-daemon/lastore_smartmirror_daemon_test.go文件中,测试用例被删除,建议保留测试用例以确保代码质量。

  7. lastore-tools/main.go文件中,dstoreapi标志的默认值被设置为空字符串,这可能会导致问题。建议提供一个有效的默认值。

  8. lastore-tools/metadata.go文件中,remote标志的默认值被设置为空字符串,这可能会导致问题。建议提供一个有效的默认值。

  9. lastore-tools/smartmirror.go文件中,official标志的默认值被设置为空字符串,这可能会导致问题。建议提供一个有效的默认值。

  10. var/lib/lastore/scripts/update_metadata_info脚本中,注释中提到了一个已移除的URL,建议更新注释以反映最新的URL。

以上是代码审查的初步意见,具体的改进措施需要根据项目的具体需求和代码上下文来决定。

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: KT-lcz, zhaohuiw42

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zhaohuiw42 zhaohuiw42 merged commit 80eef8f into linuxdeepin:master Jul 10, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants