summaryrefslogtreecommitdiff
path: root/src/database/posts.rs
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2023-01-26 21:29:06 -0500
committerTyler Murphy <tylermurphy534@gmail.com>2023-01-26 21:29:06 -0500
commit6bea3bf2ef31f978b98848a5f2a045dcab0cc2f0 (patch)
tree76e6eda59aa43378f5744fd08962b9767147671f /src/database/posts.rs
parenti did things (diff)
downloadxssbook-6bea3bf2ef31f978b98848a5f2a045dcab0cc2f0.tar.gz
xssbook-6bea3bf2ef31f978b98848a5f2a045dcab0cc2f0.tar.bz2
xssbook-6bea3bf2ef31f978b98848a5f2a045dcab0cc2f0.zip
input length and range checking
Diffstat (limited to 'src/database/posts.rs')
-rw-r--r--src/database/posts.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/database/posts.rs b/src/database/posts.rs
index 77d2387..96cd18a 100644
--- a/src/database/posts.rs
+++ b/src/database/posts.rs
@@ -11,7 +11,7 @@ pub fn init() -> Result<(), rusqlite::Error> {
CREATE TABLE IF NOT EXISTS posts (
post_id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
- content TEXT NOT NULL,
+ content VARCHAR(500) NOT NULL,
likes TEXT NOT NULL,
comments TEXT NOT NULL,
date INTEGER NOT NULL,