보완관련 질문입니다.

· 19년 전 · 1705 · 1
보안 테스트를 했는데

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
 
위와같이 결과가 나왔다고 보완관련 해결하라는 통보를 받았습니다.
 
초보라 해결하기가 쉽지가 않은데 혹시 방법 아시는분 계신가요?

 

|

댓글 1개

해당 에러는

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;
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
19년 전 조회 1,511
19년 전 조회 1,603
19년 전 조회 1,661
19년 전 조회 1,518
19년 전 조회 1,569
19년 전 조회 1,523
19년 전 조회 1,510
19년 전 조회 2,488
19년 전 조회 2,503
19년 전 조회 1,706
19년 전 조회 1,564
19년 전 조회 2,105
19년 전 조회 1,546
19년 전 조회 1,584
19년 전 조회 1,608
19년 전 조회 2,252
19년 전 조회 1,634
19년 전 조회 1,722
19년 전 조회 1,532
19년 전 조회 1,817
🐛 버그신고