This is an automated email from the ASF dual-hosted git repository.
LinkinStars pushed a change to branch dev
in repository https://gitbox.apache.org/repos/asf/answer.git
from 736dde0e build: replace Create React App with Vite (#1616)
new 66bbc744 fix: avoid sensitive auth logging
new 1a8627e2 fix: normalize imported content
new 4e4d4387 fix: align question operation permissions
new 9ace9007 fix: strengthen request safeguards
new 625ead8f fix: enforce question access controls
new 6c2c2569 fix: constrain MCP content access
new 1fdf7af3 chore: satisfy static checks
new a0d90268 fix: hide hidden questions from public answer profiles
new e0daae42 fix(security): enforce personal comment visibility
new 9eb83297 fix(security): restrict similar question visibility
new c58049e1 fix(security): revoke stale visit tokens
new 82c82330 fix(security): enforce mutation visibility checks
new 3e15d992 fix: normalize allowed email domains
new e9265e3f fix(security): preserve User Center session identity
new f6075659 fix(security): enforce reaction content visibility
new 6c00c788 chore: update version to 2.0.3 and adjust prerequisites in
README
The 16 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
Makefile | 2 +-
README.md | 4 +-
cmd/wire_gen.go | 2 +-
i18n/en_US.yaml | 3 +-
i18n/zh_CN.yaml | 3 +-
internal/base/middleware/header.go | 4 +
.../middleware/{short_id.go => header_test.go} | 35 +++--
internal/base/middleware/visit_img_auth.go | 1 +
internal/base/middleware/visit_img_auth_test.go | 155 +++++++++++++++++++++
internal/base/server/http.go | 2 +-
internal/controller/answer_controller.go | 3 +-
internal/controller/comment_controller.go | 9 +-
internal/controller/mcp_controller.go | 30 +++-
internal/controller/mcp_controller_test.go | 50 +++++++
internal/controller/meta_controller.go | 2 +
internal/controller/question_controller.go | 78 ++++++++---
internal/controller/question_controller_test.go | 49 +++++++
internal/controller/report_controller.go | 3 +-
internal/controller/vote_controller.go | 6 +-
internal/entity/answer_entity.go | 1 +
internal/repo/answer/answer_repo.go | 16 ++-
internal/repo/auth/auth.go | 16 +++
internal/repo/question/question_repo.go | 14 +-
.../repo_test/personal_answer_visibility_test.go | 89 ++++++++++++
.../repo/repo_test/question_link_security_test.go | 85 +++++++++++
internal/router/static_router.go | 20 ++-
.../lang.go => router/static_router_test.go} | 35 +++--
internal/schema/answer_schema.go | 23 +--
internal/schema/comment_schema.go | 7 +-
internal/schema/email_template.go | 7 +-
...r_activity_schema.go => email_template_test.go} | 42 ++----
internal/schema/meta_schema.go | 14 +-
internal/schema/question_schema.go | 14 +-
internal/schema/report_schema.go | 7 +-
internal/schema/vote_schema.go | 11 +-
internal/service/auth/auth.go | 10 +-
internal/service/auth/auth_test.go | 99 +++++++++++++
internal/service/auth/user_center_status_test.go | 111 +++++++++++++++
internal/service/comment/comment_service.go | 47 ++++---
.../comment/comment_service_visibility_test.go | 95 +++++++++++++
internal/service/content/answer_service.go | 8 ++
internal/service/content/question_service.go | 47 +++++--
.../content/question_service_visibility_test.go | 140 +++++++++++++++++++
internal/service/content/user_service.go | 31 +++--
internal/service/content/user_service_test.go | 43 ++++++
internal/service/content/vote_service.go | 6 +
internal/service/importer/importer_service.go | 29 ++--
.../importer/importer_service_test.go} | 31 ++---
internal/service/meta/meta_service.go | 22 +++
.../service/meta/meta_service_visibility_test.go | 103 ++++++++++++++
internal/service/question_common/question.go | 2 +-
internal/service/report/report_service.go | 3 +
internal/service/uploader/upload.go | 13 +-
internal/service/user_admin/user_backyard.go | 11 +-
.../user_center_login_service.go | 28 +++-
.../user_center_login_service_test.go | 149 ++++++++++++++++++++
pkg/checker/email.go | 3 +-
pkg/checker/email_test.go | 45 ++++++
pkg/checker/file_type.go | 2 +
pkg/checker/{url.go => file_type_test.go} | 25 ++--
60 files changed, 1691 insertions(+), 254 deletions(-)
copy internal/base/middleware/{short_id.go => header_test.go} (56%)
create mode 100644 internal/base/middleware/visit_img_auth_test.go
create mode 100644 internal/controller/mcp_controller_test.go
create mode 100644 internal/controller/question_controller_test.go
create mode 100644 internal/repo/repo_test/personal_answer_visibility_test.go
create mode 100644 internal/repo/repo_test/question_link_security_test.go
copy internal/{base/handler/lang.go => router/static_router_test.go} (56%)
copy internal/schema/{answer_activity_schema.go => email_template_test.go}
(50%)
create mode 100644 internal/service/auth/auth_test.go
create mode 100644 internal/service/auth/user_center_status_test.go
create mode 100644 internal/service/comment/comment_service_visibility_test.go
create mode 100644 internal/service/content/question_service_visibility_test.go
copy internal/{base/middleware/user_center_plugin_auth.go =>
service/importer/importer_service_test.go} (61%)
create mode 100644 internal/service/meta/meta_service_visibility_test.go
create mode 100644
internal/service/user_external_login/user_center_login_service_test.go
create mode 100644 pkg/checker/email_test.go
copy pkg/checker/{url.go => file_type_test.go} (69%)