Skip to content

Commit a1f8e3f

Browse files
Merge pull request #554 from tskong/sqlinjection-quotes
Escape single quotes for sql injection
2 parents 7bf1595 + 77de282 commit a1f8e3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

QueryBuilder/SqlResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private string ChangeToSqlValue(object value)
8181
}
8282

8383
// fallback to string
84-
return "'" + value.ToString() + "'";
84+
return "'" + value.ToString().Replace("'","''") + "'";
8585
}
8686
}
8787
}

0 commit comments

Comments
 (0)