본문 바로가기

프로그램132

The HTTP verb PUT under Apache: Safe or Dangerous? "Is the HTTP verb PUT under Apache safe or dangerous?" This is a question I come across often, and have now run into it twice in the work on Atom. So is it safe? The answer is maybe. Here are two such examples: Using DELETE and PUT may be the "right thing to do" in an ideal world, but the fact of the matter is that a lot -- if not the vast majority -- of webservers do not allow these operations... 2010. 2. 10.
mysql+php connection pooling sqlrelay 참조 http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=25928 http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=36317 mysql+php 환경에서 db pool로 알려진 sqlrelay 를 설치하여 테스트 해보는게 이문서의 목적이다. 다운로드 rudiments : http://sourceforge.net/projects/rudiments/ sqlrelay : http://sourceforge.net/projects/sqlrelay/ 현재 버젼 : rudiments-0.30.tar.gz, sqlrelay-0.38.tar.gz 다음 설치 환경.. 2010. 2. 2.
MySQL UDF를 활용한 사용자 정의 함수 추가 1. 추가할 함수 구현 - syslogudf.c 파일에 기능 구현 #include #include #include my_bool logger_init(UDF_INIT *initid, UDF_ARGS *args, char *message) { initid->maybe_null=0; return 0; } long long logger(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error) { if (args->arg_count != 1) { strcpy(error, "LOGGER(): needs message"); return 1; } if (args->arg_type[0] != STRING_RESULT) { strcpy(error, "LOGGER() .. 2010. 1. 19.
Redis Command Reference memcached 류의 Key-Value 모델 이상의 역할을 수행하는 것이 가능하다. PHP와 Redis만으로 (즉, 별도의 Database 등을 사용하지 않고) 개발되고 있다. Every command name links to a specific wiki page describing the behavior of the command. Connection handling QUIT close the connection AUTH simple password authentication if enabled Commands operating on all the kind of values EXISTS key test if a key exists DEL key delete a key TYPE key return th.. 2009. 12. 17.
안전한 PHP 프로그래밍 (첨부파일 다운 & include 함수) 1. 게시판 첨부파일 다운로드 개발시 주의점 국내 대형 IDC 운영사 사이트의 한 게시판에서 첨부파일 다운로드할 때, 내부 파일까지 다운로드할 수 있는 취약점이 있었다. 즉, /etc/ 이하의 파일이나 웹서버 설정 파일, 로그 등을 원하면 쉽게 받아볼 수 있는 취약점이었다. 이를테면 이런식이다. URL/download.html?path=/etc&file=resolv.conf&savename=resolv.txt (물론 위처럼 직접적으로 URL을 표시하지 않았지만, 눈치만 있으면 쉽게 알 수 있음) /etc/resolv.conf 를 받아서 PC에 resolv.txt 이름으로 저장하라는 예이다. '어서오세요. 저희는 개방적인 마인드로 서버의 모든 것을 네티즌에게 원하는대로 다 드립니다.'라고 얘기하는 꼴이다... 2009. 12. 8.