dr4g0nsr / radius-server

php based radius server
GNU General Public License v3.0
8 stars 12 forks source link

User-Password issue #2

Closed Ethan-Yami closed 2 years ago

Ethan-Yami commented 2 years ago

When I try running with @$attr["User-Password"] method to get password which sent by client user that the password is incorrect.

The codes are below:

if (@$attr["User-Password"]) {  // https://tools.ietf.org/html/rfc2058#section-5.2
      $encrypted_password = $this->create_user_password($password, $auth, $this->secret);
      $requested_password = $this->hex_dump($attr["User-Password"]["value"]);
      return $requested_password == $encrypted_password && $user == $attr["User-Name"]["value"];
  }

Could you please help me to solve this issue?

Many thanks.