#266 zbxe에서 비밀번호 체크시 memberModel::isValidPassword(hashes, plain)을 이용하면 md5, mysql password/old_password에 대한 검사를 할 수 있게 하여 마이그레이션 된 게시글/댓글의 비밀번호 검사도 가능하도록 변경

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3007 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-11-19 08:06:28 +00:00
parent 4624c74dbd
commit d4c6825802
5 changed files with 64 additions and 73 deletions

View file

@ -187,11 +187,12 @@
**/
function procBlogVerificationPassword() {
// 비밀번호와 문서 번호를 받음
$password = md5(Context::get('password'));
$password = Context::get('password');
$document_srl = Context::get('document_srl');
$comment_srl = Context::get('comment_srl');
$oMemberModel = &getModel('member');
// comment_srl이 있을 경우 댓글이 대상
if($comment_srl) {
// 문서번호에 해당하는 글이 있는지 확인
@ -200,7 +201,7 @@
if(!$oComment->isExists()) return new Object(-1, 'msg_invalid_request');
// 문서의 비밀번호와 입력한 비밀번호의 비교
if($oComment->get('password') != $password) return new Object(-1, 'msg_invalid_password');
if(!$oMemberModel->isValidPassword($oComment->get('password'),$password)) return new Object(-1, 'msg_invalid_password');
$oComment->setGrant();
} else {
@ -210,7 +211,7 @@
if(!$oDocument->isExists()) return new Object(-1, 'msg_invalid_request');
// 문서의 비밀번호와 입력한 비밀번호의 비교
if($oDocument->get('password') != $password) return new Object(-1, 'msg_invalid_password');
if(!$oMemberModel->isValidPassword($oDocument->get('password'),$password)) return new Object(-1, 'msg_invalid_password');
$oDocument->setGrant();
}