보안2 [보안] SQL Injection 관련 정리 1. magic_quote_gpc Sets the magic_quotes state for GPC (Get/Post/Cookie) operations. When magic_quotes are on, all ' (single-quote), " (double quote), \ (backslash) and NUL's are escaped with a backslash automatically. 이것은 자동으로 addslashes() 를 하는 옵션입니다. 하지만 sql 문법에 완전히 맞지 않습니다. 물론 \ 로 escape 하는 문법을 지원해 주긴 합니다만, 원래의 문법은 아닙니다. 게다가 ; 는 escape 시키지 않으니 사소한 실수로 큰 보안구멍이 발생할 수 있습니다. 2. *_escape_string() .. 2012. 3. 26. CentOS SELINUX 끄기 추가후 혹시 php -v 하였을시 아래와 같이 나온다면 Failed loading /usr/lib/httpd/modules/ZendOptimizer.so: /usr/lib/httpd/modules/ZendOptimizer.so: cannot restore segment prot after reloc: Permission denied 레드햇 계열인 rhel 이나 fedora나 centos인 경우에는 일단 setenforce 0 으로 selinux 기능을 끄시고 vi /etc/sysconfig/selinux 열어서 SELINUX=enforcing 되어있는거을 disabled 로 변경하시면 다음부팅에도 selinux가 비활성화 됩니다 2011. 4. 29. 이전 1 다음