Skip to content

Commit 4a95592

Browse files
Update src/controllers/helpers/pagination.rs
Co-authored-by: Carol (Nichols || Goulding) <193874+carols10cents@users.noreply.github.com>
1 parent d53a93f commit 4a95592

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/controllers/helpers/pagination.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,8 @@ where
350350
out.push_sql(") t LIMIT ");
351351
out.push_bind_param::<BigInt, _>(&self.options.per_page)?;
352352
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.
353355
out.push_sql(format!(" OFFSET {offset}").as_str());
354356
}
355357
Ok(())

0 commit comments

Comments
 (0)