Summary
CheckUser uses an outdated algorithm for storing encrypted data and has insufficient error handling to diagnose related errors.
Background
CheckUser stores some private data encrypted, namely the recipients of emails sent via EmailUser if $wgCUPublicKey is valid.
This uses the RC4 algorithm for encryption, which is disabled on some systems (e.g. on Fedora and derivatives since 2015[1]) due to security concerns.
The code however does not handle encryption-related errors, so a failure due to a missing algorithm would only result in a cryptic PHP Notice (Trying to access array offset on null).
[1] https://fedoraproject.org/wiki/Changes/RemoveSSL3andRc4
Technical notes
The code should raise a meaningful error if encryption fails and it should preferably use a more secure algorithm.
Acceptance criteria
- CheckUser can store private data even if system OpenSSL doesn't have RC4 enabled
- CheckUser reports meaningful errors if it cannot store encrypted data