EASY7

sql injection 본문

개발 공부

sql injection

E.asiest 2018. 6. 10. 14:12

     select * 

     from account

     where userId='ss' and password='' or 1=1 --';


password에 'or 1=1 -- 입력함.

-> and가 or보다 우선순위가 높기 때문에 

-> --은 그 뒤로는 모두 주석처리함.

account의 모든 행이 출력된다.

해결책

1. '따옴표는 password나 id에 허용하지 말자

2. select delete insert drop -(하이픈)등이 input되지 않도록 하자


'개발 공부' 카테고리의 다른 글

apache ..웹서버  (0) 2019.08.14
SQL 인젝션..  (0) 2019.08.13
[에러]The prefix "task" for element "task:scheduler" is not bound.  (0) 2018.06.05
컬러 색 color  (0) 2018.06.01
STS 에 Git 연동 방법  (0) 2018.05.19
Comments