Skip to content

Commit

Permalink
fix: don't expose user existence if visitor can't view users
Browse files Browse the repository at this point in the history
resolves NodeBB#12432
  • Loading branch information
oplik0 committed Mar 27, 2024
1 parent 277e178 commit 6e324ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middleware/index.js
Expand Up @@ -174,7 +174,7 @@ async function expose(exposedField, method, field, req, res, next) {
}
const value = await method(String(req.params[field]).toLowerCase());
if (!value) {
next('route');
middleware.canViewUsers(req, res, () => next('route'));
return;
}

Expand Down

0 comments on commit 6e324ed

Please sign in to comment.