Change the Standard profile default configuration to not allow anonymous profile photo uploads

Created on 31 May 2023, over 1 year ago

Problem/Motivation

By default without intervention:

  • core/profiles/standard/config/install/field.storage.user.user_picture.yml installs with uri_scheme: public
  • core/profiles/standard/config/install/user.settings.yml installs with register: visitors_admin_approval

If left unchanged, an anonymous user can register (pending approval) uploading an inappropriate image. The image is then publicly available via that organisation's URL immediately without the user yet being approved. The malicious actor can then document that such an image is available at that URL and use that to potentially blackmail the organisation.

Steps to reproduce

  1. Drupal standard install
  2. Register as an anonymous user filling in the profile image with an inappropriate image
  3. Hover over profile image upload to get file path
  4. Share file path elsewhere

Proposed resolution

Only allow authenticated users to add profile pictures, so it profile image does not appear on the registration form.

Remaining tasks

Update registration form

User interface changes

Profile image no longer available via registration form

API changes

None

Data model changes

None

Release notes snippet

Only authenticated users can upload a profile image by default in the 'Standard' profile default configuration so that anonymous users cannot upload inappropriate images and share them maliciously.

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
User moduleΒ  β†’

Last updated 3 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom scott_euser

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024