| 제목 | 웅파님이 올려주신 Tip 질문. | ||
|---|---|---|---|
| 글쓴이 | 수야디벨 | 작성시각 | 2013/03/27 18:57:41 | 
|  | |||
| http://codeigniter-kr.org/include/syntaxhighlighter/styles/wrapping.png) !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; line-height: 1.1em !important; font-size: 1em !important; display: block !important; text-indent: -1.5em !important; background-position: 0px 1.1em !important; background-repeat: no-repeat no-repeat !important;"> class Class_name extends CI_Controller{ public function __construct(){ $this->param = $this->input->post(NULL,ture); } function aa() { print_r($this->param); } } 하면 xss 공격에 쉽게 방어할 수 있다고 하셨는데, 아직 경험이 적은 관계로 사용 방법이 쉽게 받아 들여지지 않습니다 .ㅠ 원래 $_POST['변수'] ; 로 사용하던 것을 , 웅파님 지적으로 보안 처리를 해준다는 $this->input->post('변수',true); 로 변경한적이 있습니다. 그런데 위에 적힌 팁은 같은 개념인건가요? 1. 우선 생성자에 $this->param = $this->input->post(NULL, true); 이라고 호출 하라는건가요~? | |||
| 다음글 | 로드와 에코의 갭 차이 (6) | ||
| 이전글 | ci 를 이제 시작하는 초보 입니다~ (6) | ||
| 
                                한대승(불의회상)
                                /
                                2013/03/27 20:17:49 /
                                추천
                                0
                             | 
| 
                                꾸숑
                                /
                                2013/03/28 14:50:51 /
                                추천
                                0
                             
                                수다야벨// 참고로 Form Validation 의 xss_clean를 사용해도 됩니다.
                             | 
| 
                                수야디벨
                                /
                                2013/03/28 17:44:10 /
                                추천
                                0
                             
                                 불의회상 , 꾸숑 // 감사합니다. 조언 참고해서 해보도록 하겠습니다.ㅎ | 
그래서 print_r로 값을 찍어 보는거구요.
이것 저것 생각하지 마시고 컨트롤러 하나 만들어서 실행 시켜 보세요.