We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d53a93f commit 4a95592Copy full SHA for 4a95592
src/controllers/helpers/pagination.rs
@@ -350,6 +350,8 @@ where
350
out.push_sql(") t LIMIT ");
351
out.push_bind_param::<BigInt, _>(&self.options.per_page)?;
352
if let Some(offset) = self.options.offset() {
353
+ // Injection safety: `offset()` returns `Option<i64>`, so this interpolation is constrained to known
354
+ // valid values and this is not vulnerable to user injection attacks.
355
out.push_sql(format!(" OFFSET {offset}").as_str());
356
}
357
Ok(())
0 commit comments