비회원이 쓴 비밀글에 대한 관리자의 일반답글(비밀글 아님)의 경우 조회시 비밀번호 확인이 이루어 집니다.
하지만 비회원이 쓴 원글의 비밀번호를 입력해도 조회 되지 않으며 소스를 분석해본바 해당 글의 비밀번호만 확인 하고 있었습니다.(답글은 관리자 로그인해 쓴 글이므로 비번이 존재하지 않음)
원글의 비번으로 조회 가능하게 소스를 수정 했고 아직 별다른 오류는 발견되지 않은거 같은데 확인 부탁 드립니다.
KBoardBuilder.class.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | 180 public function builderDocument(){ 181 global $user_ID ; $userdata = get_userdata( $user_ID ); $url = new KBUrl(); $content = new KBContent( $this ->board_id); $content ->initWithUID( $this ->uid); $skin_path = KBOARD_URL_PATH . "/skin/$this->skin" ; $board = $this ->board; if (! $this ->board->isReader( $content ->member_uid, $content ->secret) && $content ->notice != 'true' ){ if ( $this ->board->permission_write== 'all' && ( $this ->board->permission_read== 'all' || $this ->board->permission_read== 'author' )){ // ############ [start] : 비밀글의 답글 조회 -> 원글 비밀번호로 확인 ############# $parent = new KBContent(); $parent ->initWithUID( $content ->parent_uid); if ( $parent ->secret== 'true' && ! $content ->notice && ( $this ->board->isEditor( $parent ->member_uid) || $this ->board->isConfirm( $parent ->password, $parent ->uid))) $content ->password = $parent ->password; // ############ [end] : 비밀글의 답글 조회 -> 원글 비밀번호로 확인 ############ if (! $this ->board->isConfirm( $content ->password, $content ->uid)){ include KBOARD_DIR_PATH . "/skin/$this->skin/confirm.php" ; } else { $allow_document = true; } } else if (! $user_ID ){ die ( '<script>alert("' .__( 'Please Log in to continue.' , 'kboard' ). '");location.href="' .wp_login_url(). '";</script>' ); } else { die ( '<script>alert("' .__( 'You do not have permission.' , 'kboard' ). '");history.go(-1);</script>' ); } } |
좋은 정보 감사합니다.
답글 기능이 적용된지 얼마 안되어 문제들이 조금 있습니다.
위 주소는 문제가 일부 해결된 최신버전 스킨의 editor.php 파일 소스 코드 입니다.
위 editor.php 파일의 코드와
본문에 남겨주신 코드를 종합하여 나은 방법으로 최적화 하겠습니다.
AI 상담