Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

fix magic hash authentication bypass #148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions admin/kernel/api/login.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ public function verify_login($args)
if(!empty($args['username'])&&!empty($args['password']))
{
// Check username
if($args['username']==$_USER[0]['username'])
if($args['username']===$_USER[0]['username'])
{
// Generate the password hash
$hash = sha1($args['password'].$_USER[0]['salt']);

// Check password
if($hash==$_USER[0]['password'])
if($hash===$_USER[0]['password'])
{
$this->db_users->set(array('username'=>$args['username'], 'session_fail_count'=>0, 'session_date'=>time()));

Expand Down Expand Up @@ -264,4 +264,4 @@ private function get_key()

} // END class LOGIN

?>
?>