Skip to content

Commit 77de282

Browse files
committed
Escape single quotes for sql injection
1 parent f9dc447 commit 77de282

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)