跳至主要内容

SQL注入(SQL Injection)攻击现象与防范

以前只听说SQL注入在ASP等一些Web程序中比较普遍,但真正了解并仔细研究后,才发现它是一种 编码中出现的不安全漏洞,不光是ASP,所有开发工具和数据库,所有C/S、B/S编写的程序都可能发生SQL注入,包括VB、Delphi、C#、 JAVA、SQL Server、Oracle等。

SQL注入漏洞是开发人员不注重自己程序的安全性所造成的,说白了也是开发人员技术水平的一个体现,平常总听说“安全性”,感觉离自己很遥远,其实软件的安全性就在我们身边。

该好好检查检查自己的程序了,让防范SQL注入成为自己编写数据库程序的一个习惯!

以下是最近浏览的一些SQL注入和数据库安全性方面的文章,都出自微软,介绍得较为全面,非常值得一读:

SQL Injection (資料隱碼)– 駭客的 SQL填空遊戲 (Microsoft TaiWan)

『資料隱碼』SQL Injection的源由與防範之道 (Microsoft TaiWan)

构建安全的数据访问 (Microsoft China TechNet)

数据访问安全性 (Microsoft China TechNet)

数据访问安全性 (Microsoft China MSDN)

保证数据库服务器的安全 (Microsoft China TechNet)

评论

此博客中的热门博文

How to change ViewPager scroll animation duration and velocity

When you call change current selected view pager position you may call like this. // change current position default is viewPager.setCurrentItem(position, true); viewPager . setCurrentItem ( position ); There will show transaction animation for change position , but this animation is too fast. So I want change this animation. When I see source code I find this, like flow. where is the scroll animation and speed.     int duration = 0 ;     velocity = Math . abs ( velocity );     if ( velocity > 0 ) {         duration = 4 * Math . round ( 1000 * Math . abs ( distance / velocity ));     } else {         final float pageWidth = width * mAdapter . getPageWidth ( mCurItem );         final float pageDelta = ( float ) Math . abs ( dx ) / ( pageWidth + mPageMargin );         duration = ( int ) (( pageDelta + 1 ) * 100 );     }     duration = Math . min ( duration , MAX_SETTLE_DURATION );     mScroller . startScroll ( sx , sy , dx , d

how to open context menu for android listview item button

Like title, here is this problem in my activity like this: An more button in every row of listview item . When I click this more button then show activity context menu. So I try to click button, but open context menu is the Adaper's context menu. My  Adapter  is extends from BaseAdapter ,  BaseAdapter  has not context menu. My solution like example : <ImageButton android:id="@+id/more" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:layout_marginRight="15dp" android:background="#00000000" android:src="@drawable/btn_addressbook_more" android:onClick="onMoreClick"/> Add an event named  onMoreClick , when user click this button will do  onClick  event in  activity . // maybe you can registe

How to use Realm database in Kotlin

Hot to use Realm in android project. Befor you use realm we should be read documentation https://realm.io/docs/java/latest#getting-started Then we got the way how to install. Install Realm as a Gradle plugin. Setp 1:   change build.gradle in project level buildscript { repositories { jcenter() } dependencies { classpath "io.realm:realm-gradle-plugin:5.14.0" } } Step 2:   Apply the realm-android plugin to the top of the application level build.gradle file. Create reaml map Object There has two way for mapping Object Make   Object   extends   ReamlObject Or make   Object   implement   ReamlModel Declear reaml mapping objects Realm not support   data class   yet. So we can't use it now. And object will make it open, because Realm object will generate subclass after   aapt   or   kapt . // 1. open class User : RealmObject() { var id: String = UUID . random UUID() . to String() var name: String = "