# How to encrypt the email addresses for compliance with privacy and PII laws?

**URL:** <https://meta.discourse.org/t/how-to-encrypt-the-email-addresses-for-compliance-with-privacy-and-pii-laws/25122>\
**Category:** Feature\
**Tags:** privacy\
**Created:** [2월 11, 2015, 9:55오전 UTC](https://meta.discourse.org/t/how-to-encrypt-the-email-addresses-for-compliance-with-privacy-and-pii-laws/25122 "2015-02-11T09:55:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [2월 12, 2015, 3:47오전 UTC](https://meta.discourse.org/t/how-to-encrypt-the-email-addresses-for-compliance-with-privacy-and-pii-laws/25122/2 "2015-02-12T03:47:38Z")

</div>

Oooh, that’s going to be a tough one.

Currently, when an admin or moderator views the email of an account, it is logged, _except if an admin takes a backup and reads the email from there_. So there’s a layer of protection against rogue employees, but it’s not foolproof.

SQL injection - Discourse has never had a SQL injection vulnerability, and I don’t think it ever will. There was one in Rails that got patched, but Discourse was never going to trigger it. What you need to be worried about is someone getting XSS on an admin and using that to extract sensitive data.

* * *

It sounds to me like you need encryption-at-rest of the emails, plus disabling the ability to Show Email or search users by email.

This also shares aspects with needs from medical organizations of anonymity of user accounts.

---

_[View the full topic](https://meta.discourse.org/t/how-to-encrypt-the-email-addresses-for-compliance-with-privacy-and-pii-laws/25122)._
