Unable to set password when registering user via Ice #3021

Open
opened 2026-02-20 22:16:46 -05:00 by deekerman · 1 comment
Owner

Originally created by @ThreadDeath on GitHub (Jun 27, 2025).

The issue

I'm trying to create a user using PHP in combination with ICE, and I'm using MySQL as the database. However, the three fields 'password_hash', 'salt', and 'kdf_iterations' always turn out to be empty. This has been bothering me for days. Can someone help me figure this out? Below is the key code.

 public static function registerUser(string $username, string $password, ?string $email = null): ?int
    {
        try {
            $server = self::getMumbleServer();
            $userInfoMap = [
                \MumbleServer\UserInfo::UserName => $username,
                \MumbleServer\UserInfo::UserPassword => $password,
                \MumbleServer\UserInfo::UserEmail => $email ?? ''
            ];

            $userId = $server->registerUser($userInfoMap);

            return $userId;
        } catch (\Exception $e) {
            Log::error("register user failed", [
                'username' => $username,
                'error' => $e->getMessage(),
                'error_type' => get_class($e),
                'stack_trace' => $e->getTraceAsString()
            ]);
            throw $e;
        }
    }
Image

Mumble version

1.5.735

Mumble component

Client

OS

macOS

Additional information

No response

Originally created by @ThreadDeath on GitHub (Jun 27, 2025). ### The issue I'm trying to create a user using PHP in combination with ICE, and I'm using MySQL as the database. However, the three fields 'password_hash', 'salt', and 'kdf_iterations' always turn out to be empty. This has been bothering me for days. Can someone help me figure this out? Below is the key code. ``` public static function registerUser(string $username, string $password, ?string $email = null): ?int { try { $server = self::getMumbleServer(); $userInfoMap = [ \MumbleServer\UserInfo::UserName => $username, \MumbleServer\UserInfo::UserPassword => $password, \MumbleServer\UserInfo::UserEmail => $email ?? '' ]; $userId = $server->registerUser($userInfoMap); return $userId; } catch (\Exception $e) { Log::error("register user failed", [ 'username' => $username, 'error' => $e->getMessage(), 'error_type' => get_class($e), 'stack_trace' => $e->getTraceAsString() ]); throw $e; } } ``` <img width="1221" alt="Image" src="https://github.com/user-attachments/assets/94374cdb-d6e2-4a4d-8baf-509e03b19a4f" /> ### Mumble version 1.5.735 ### Mumble component Client ### OS macOS ### Additional information _No response_
Author
Owner

@Krzmbrzl commented on GitHub (Jun 29, 2025):

I'm going through the current code on master (which is not the one you are using but it should be close enough) and what I find there is
github.com/mumble-voip/mumble@2c645897bd/src/murmur/DBWrapper.cpp (L1473-L1479)
indicating that password etc. seem to require some special handling. My best guess is that this is just never done when registering via Ice.

Looking further, the special handling happens at
github.com/mumble-voip/mumble@2c645897bd/src/murmur/Server.cpp (L3072-L3081)

which is inside Server::setUserProperties which however is not called when registering a user via Ice, which is a bug.

So I am reasonably sure that this bug also existed in 1.5.

@Krzmbrzl commented on GitHub (Jun 29, 2025): I'm going through the current code on `master` (which is not the one you are using but it should be close enough) and what I find there is https://github.com/mumble-voip/mumble/blob/2c645897bdbcf9c6f98c48616f01a12bef57568f/src/murmur/DBWrapper.cpp#L1473-L1479 indicating that password etc. seem to require some special handling. My best guess is that this is just never done when registering via Ice. Looking further, the special handling happens at https://github.com/mumble-voip/mumble/blob/2c645897bdbcf9c6f98c48616f01a12bef57568f/src/murmur/Server.cpp#L3072-L3081 which is inside `Server::setUserProperties` which however is not called when registering a user via Ice, which is a bug. So I am reasonably sure that this bug also existed in 1.5.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/mumble-mumble-voip#3021
No description provided.