MSSQL Injection

오랜만에 포스팅

SQL Injection을 막는 방법으로 가장 일반적인 것이 Stored Procedure.

그리고 SP를 쓰지만 쿼리의 복잡함으로 Dynamic Query를 생성해서 쓸 때 다시 Injection의 위험이 있음.

MSDN 참고 페이지는
http://msdn.microsoft.com/en-us/library/ms188001.aspx#Mtps_DropDownFilterText

실은 SP를 사용해서 Return Value를 받아 올 때, @testOutput =@test output의 문법을 이해 못해서 찾아보다가 알 게 된 것.

declare @test int
exec sp_test @testOutput = @test output

declare @test int
exec sp_test @test output 와 동일

Tags:

Leave a Comment