The special page Special:EditProfile allows users with the editothersprofiles user right to edit other users' social profiles. It bundles most of the Special:UpdateProfile page (which is usually usable by all registered users for updating their own social profile data) into a single-page view, excluding the preferences section of Special:UpdateProfile.
It also doesn't respect the profile fields' visibility setting ([visible to] everyone/friends/friends of friends/hidden). "Whoops".
Minimal reproducible test case:
- Have two accounts, let's call them Admin and User, with Admin belonging to a group which has been assigned the editothersprofiles user right
- As User, edit your profile via Special:UpdateProfile and select one or more fields to be NOT visible to everyone, e.g. friends or friends of friends only, or hidden; hidden is, of course, the easiest choice since that should never be shown to anyone else
- Give the chosen field some kind of a value
- Hit the save button
- Log out as User, log in as Admin and go to Special:EditProfile/User
- You'll be able to see the "hidden" field's (or fields') value(s) just fine, even though you shouldn't be (assuming that the field was indeed "hidden" and not "friends" or "friends of friends" and furthermore assuming that Admin isn't a friend of User or anyone who is friends with User)
One thing with my low-effort/no-effort patch, which I'll try to post here later today or so, I didn't check is how do fields that are hidden behave after someone with no rights to view 'em but the right to use Special:EditProfile edits their profile - my guess is that the data gets overwritten, and that'd also be less than ideal.