보완관련 질문입니다. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

보완관련 질문입니다. 정보

보완관련 질문입니다.

본문

보안 테스트를 했는데

http://도메인/bbs/board.php?bo_table=bbs07&sfl='&stx=1&spt=1&page=1&sw=1 으로 테스트를 한 모양인데

 

select distinct wr_parent from g4_write_bbs07 where ((INSTR(\', '1')) ) and (wr_num between '1' and '10001')
 
1064 : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '\', '1')) ) and (wr_num between '1' and '10001')' at line 1
error file : /bbs/board.php
 
위와같이 결과가 나왔다고 보완관련 해결하라는 통보를 받았습니다.
 
초보라 해결하기가 쉽지가 않은데 혹시 방법 아시는분 계신가요?

 
  • 복사

댓글 전체

해당 에러는

g4/lib/common.lib.php에서
function get_sql_search($search_ca_name, $search_field, $search_text, $search_operator='and')
함수에서 만든 sql 때문인 듯합니다.

                default :
                    if (preg_match("/[a-zA-Z]/", $search_str))
                        $str .= "INSTR(LOWER($field[$k]), LOWER('$search_str'))";
                    else
                        $str .= "INSTR($field[$k], '$search_str')";
                    break;

이 부분에서


default: 다음에 다음 한 줄을 넣어 보세요.
            if( preg_match( "/^[a-z_A-Z]/", $field[$k]) break;
© SIRSOFT
현재 페이지 제일 처음으로