- Issue created by @ptmkenny
- 🇯🇵Japan ptmkenny
Comment from the security issue by ptmkenny:
I was able to reproduce the behavior locally and confirm the bug.
Regarding the example of the mail field, if you use the Field Encrypt module to encrypt the "mail" or "name" base field, it will break logging in to the site, but it will not (to my knowledge) expose any information; you will just have a broken site (which is not good, but it is not a security issue; I will open a follow-up issue later to fix this by not showing the mail and name fields as options). For people who need to encrypt email addresses, the Dbee module is available and works well (this should be noted on the Field Encrypt project page under Known Limitations).
This issue is a result of the entity query in the UniqueField constraint not having access to unencrypted data, which will result in failed validation (values will always be considered unique). This is a bug, but I do not think it is a security issue because the encryption is maintained (also, this is not a case of breakage in which a feature stopped working; the module has never worked with the UniqueField constraint), so I think it is safe to work on publicly.
- 🇯🇵Japan ptmkenny
Comment from the security issue by alexpott:
I think this is the same as the caveats for Views filters or JSON:API filtering but should ideally come with a solution of sorts. Maybe an error if you try to encrypt a field or some form other way of doing uniqueness without knowing the value.
- 🇯🇵Japan ptmkenny
For now, I have updated the module page to note this incompatiblity.