[error] TypeError: Drupal\security_review\SecurityReview::getServerUid(): Return value must be of type int, null returned

Created on 16 June 2024, 7 months ago
Updated 28 June 2024, 7 months ago

Problem/Motivation

I just started to review "drush security:review" and ran into this error:
[error] TypeError: Drupal\security_review\SecurityReview::getServerUid(): Return value must be of type int, null returned

I believe there is fundamental problem with the logic for getting webserver uid in cli mode and check write permissions cannot work currently. But at first the wrapping function need a default int value to avoid type error.

Steps to reproduce

In my setup I only need to use "drush security:review".

Proposed resolution

At first I thougt a drupal way of using "0" but this for the super user on posix systems. So I think "-1" (uid_t) is a good default value as used in in chown: https://pubs.opengroup.org/onlinepubs/009695399/functions/chown.html
See also https://en.wikipedia.org/wiki/User_identifier

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: duplicate

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany c-logemann Frankfurt/M, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024