From 6bea3bf2ef31f978b98848a5f2a045dcab0cc2f0 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Thu, 26 Jan 2023 21:29:06 -0500 Subject: input length and range checking --- src/database/posts.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/database') 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, -- cgit v1.2.3-freya