回答編集履歴
1
SQLインジェクションの説明を修正
answer
CHANGED
@@ -19,4 +19,5 @@
|
|
19
19
|
/* お勧めできません */
|
20
20
|
string sql = @"select username from test_table where data = '" + name + "'";
|
21
21
|
NpgsqlCommand cmd = new NpgsqlCommand(sql, conn);
|
22
|
-
```
|
22
|
+
```
|
23
|
+
変数`name`におかしな値、例えば`hoge'; delete from test_table where 'a'='a`などという文字列が入っていたら……。
|