#86. mysql이용시 old_password()를 php함수에서 1차 처리후 틀리면 직접 mysql에 쿼리로 old_password()를 가져오도록 하여 문제 해결

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2368 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-08-22 00:13:44 +00:00
parent 7c3ea0b220
commit 3a970616b1
3 changed files with 36 additions and 2 deletions

View file

@ -873,6 +873,7 @@
// 비밀번호 검사 : 우선 md5() hash값으로 비굥
if($password && $member_info->password != md5($password)) {
// 혹시나 하여.. -_-;; mysql old_password로 검사하여 맞으면 db의 비밀번호 교체
if($this->mysql_pre4_hash_password($password) == $member_info->password) {
@ -882,9 +883,22 @@
$output = executeQuery('member.updateMemberPassword', $password_args);
if(!$output->toBool()) return $output;
// md5(), mysql old_password와도 다르면 잘못된 비빌번호 오류 메세지 리턴
} else {
return new Object(-1, 'invalid_password');
// mysql_pre4_hash_password()함수의 결과와도 다를 경우 현재 mysql DB이용시 직접 쿼리 날림
if(substr(Context::getDBType(),0,5)=='mysql') {
$oDB = &DB::getInstance();
if($oDB->getOldPassword($password) == $member_info->password) {
$password_args->member_srl = $member_info->member_srl;
$password_args->password = md5($password);
$output = executeQuery('member.updateMemberPassword', $password_args);
if(!$output->toBool()) return $output;
}
// md5(), mysql old_password와도 다르면 잘못된 비빌번호 오류 메세지 리턴
} else {
return new Object(-1, 'invalid_password');
}
}
}