You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, RepresentativeRenderUserInterface::getUserToRenderAs() works by finding a user account with the required combination of roles but this is potentially insecure if this somehow reveals something to a user account that should not have access to that information, such as admin information or data.
Potential idea if it's not possible to render as a user that has not been saved to the database (i.e. a temporary user): create and save user accounts with the following traits:
Clearly labelled unique user account name and generated (non-existent) email address; e.g. "Changes render user N" / "[email protected]" ("N" being a counter for uniqueness; domain name should be taken from system.site.mail config).
Must be assigned the same role(s) as identified "real" user accounts it's the counterpart to.
Blocked so that no one can access it; this should theoretically still allow rendering?
Maybe provide some kind of warning if someone who can administer users tries to delete such an account so they know why they exist/are being created?
Additionally, it'll be a good idea to store a array/map of these generated user accounts so they can be easily retrieved. Perhaps they can be stored in the State API, along with a corresponding cache item which is assigned all the relevant cache tags (e.g. user:123, user:124, etc.) so that we know to rebuild the state entry if any of the accounts are modified or deleted.
Ambient-Impact
changed the title
Refactor changes rendering to generate temporary user accounts instead of using existing accounts
Refactor rendering to generate temporary user accounts instead of using existing accounts
Jan 14, 2023
Ambient-Impact
changed the title
Refactor rendering to generate temporary user accounts instead of using existing accounts
Refactor rendering to generate user accounts instead of using existing accounts
Jan 24, 2023
Currently,
RepresentativeRenderUserInterface::getUserToRenderAs()
works by finding a user account with the required combination of roles but this is potentially insecure if this somehow reveals something to a user account that should not have access to that information, such as admin information or data.drupal-omnipedia-user/src/Service/RepresentativeRenderUserInterface.php
Line 48 in 858e58a
drupal-omnipedia-user/src/Service/RepresentativeRenderUser.php
Line 139 in 858e58a
The text was updated successfully, but these errors were encountered: