Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
1a1e23fc
Commit
1a1e23fc
authored
Jan 09, 2026
by
shaw
Committed by
admin
Jan 09, 2026
Browse files
fix(auth): 注册接口安全加固 - 默认关闭注册
parent
d1c2a61d
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/service/auth_service_register_test.go
View file @
1a1e23fc
...
...
@@ -184,7 +184,9 @@ func TestAuthService_Register_CheckEmailError(t *testing.T) {
func
TestAuthService_Register_ReservedEmail
(
t
*
testing
.
T
)
{
repo
:=
&
userRepoStub
{}
service
:=
newAuthService
(
repo
,
nil
,
nil
)
service
:=
newAuthService
(
repo
,
map
[
string
]
string
{
SettingKeyRegistrationEnabled
:
"true"
,
},
nil
)
_
,
_
,
err
:=
service
.
Register
(
context
.
Background
(),
"linuxdo-123@linuxdo-connect.invalid"
,
"password"
)
require
.
ErrorIs
(
t
,
err
,
ErrEmailReserved
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment