6. What database technology, if implemented for web forms, can limit the potential for SQL injection attacks?
(A) Triggers
(B) Stored procedures
(C) Column encryption
(D) Concurrency control

答案:登入後查看
統計: A(0), B(0), C(0), D(1), E(0) #3560395

詳解 (共 1 筆)

#6634763

Stored procedures

  • 指把 SQL 語法 事先寫好、存放在資料庫內,並且只透過參數呼叫。

  • 在呼叫時,不會直接把使用者輸入的字串拼接成 SQL 指令,而是以參數化方式帶入,能大幅降低 SQL Injection 風險。

  • 和「Prepared Statements(預備語句)」概念相似,都是防 SQL Injection 的主力。

選項對照

  • (A) Triggers → 在特定事件發生時自動執行 SQL,但和防 SQL injection 沒直接關係。

  • (B) Stored procedures → 正解,避免動態拼接 SQL。

  • (C) Column encryption → 保護資料存放安全,防止洩漏,但不能防 SQL injection。

  • (D) Concurrency control → 用來解決多用戶同時存取資料的問題,不相關。

0
0