Skip to content

Commit c408ffb

Browse files
fix: Email leakage in user profile page
1 parent b54aa54 commit c408ffb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client/pages/user/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ export default async function User({ userId }) {
8383
: ''}
8484
</div>
8585
<div className='socials' onclick={(e) => e.target.dataset.href && Router.loadUrl(e.target.dataset.href)}>
86-
<button type='button' title='email' className='icon mail' data-href={`mailto:${user.email}`} />
86+
{shouldShowSensitiveInfo && (
87+
<button type='button' title='email' className='icon mail' data-href={`mailto:${user.email}`} />
88+
)}
8789
{user.github && (
8890
<button type='button' title='go to github account' className='icon github' data-href={`https://github.com/${user.github}`} />
8991
)}

0 commit comments

Comments
 (0)