Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
f25081bc
Unverified
Commit
f25081bc
authored
1 year ago
by
Pierre Lehnen
Committed by
Diego Sampaio
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] Never-used imported accounts can be accessed without proper authentication. (#670)
parent
a56f5f0a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.changeset/ten-games-roll.md
+5
-0
5 additions, 0 deletions
.changeset/ten-games-roll.md
apps/meteor/server/methods/registerUser.ts
+1
-9
1 addition, 9 deletions
apps/meteor/server/methods/registerUser.ts
with
6 additions
and
9 deletions
.changeset/ten-games-roll.md
0 → 100644
+
5
−
0
View file @
f25081bc
---
'
@rocket.chat/meteor'
:
patch
---
Removed an unused authentication flow
This diff is collapsed.
Click to expand it.
apps/meteor/server/methods/registerUser.ts
+
1
−
9
View file @
f25081bc
...
...
@@ -95,15 +95,7 @@ Meteor.methods<ServerMethods>({
let
userId
;
try
{
// Check if user has already been imported and never logged in. If so, set password and let it through
const
importedUser
=
await
Users
.
findOneByEmailAddress
(
formData
.
email
);
if
(
importedUser
?.
importIds
?.
length
&&
!
importedUser
.
lastLogin
)
{
await
Accounts
.
setPasswordAsync
(
importedUser
.
_id
,
userData
.
password
);
userId
=
importedUser
.
_id
;
}
else
{
userId
=
await
Accounts
.
createUserAsync
(
userData
);
}
userId
=
await
Accounts
.
createUserAsync
(
userData
);
}
catch
(
e
)
{
if
(
e
instanceof
Meteor
.
Error
)
{
throw
e
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment