Skip to content

Commit 8f9ff30

Browse files
authored
Merge pull request #6 from 1Code-JS/patch-1
fix: Email leakage in user profile page
2 parents 1cf92c6 + c408ffb commit 8f9ff30

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
@@ -87,7 +87,9 @@ export default async function User({ userId }) {
8787
)}
8888
</div>
8989
<div className='socials' onclick={(e) => e.target.dataset.href && Router.loadUrl(e.target.dataset.href)}>
90-
<button type='button' title='email' className='icon mail' data-href={`mailto:${user.email}`} />
90+
{shouldShowSensitiveInfo && (
91+
<button type='button' title='email' className='icon mail' data-href={`mailto:${user.email}`} />
92+
)}
9193
{user.github && (
9294
<button type='button' title='go to github account' className='icon github' data-href={`https://github.com/${user.github}`} />
9395
)}

0 commit comments

Comments
 (0)