git show 8e673801262c66af4a54837f63ff596407835c20
effective_user = get_id();
- if (strlen(username) == 0)
+ if (!username)
username = effective_user;
The previous code already intended to treat a missing username as falling
back to the system user.
The check was changed from strlen(username) == 0 to !username, but this
inadvertently stopped handling the empty-string case. This patch restores
the original intent and makes the behavior consistent.
David G. Johnston <[email protected]> 于2025年7月1日周二 20:12写道:
> On Tue, Jul 1, 2025 at 7:56 PM Jianghua Yang <[email protected]> wrote:
>
>> Let me know if this approach seems reasonable or if you’d prefer we
>> explicitly reject empty usernames with an error instead.
>>
>>
> I'd rather we reject the ambiguous input.
>
> David J.
>
>