summaryrefslogtreecommitdiffhomepage
path: root/storage.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-02-12 13:35:27 +0100
committerRoland Reichwein <mail@reichwein.it>2023-02-12 13:35:27 +0100
commit139f0cee972ecd2928b78fdbbc0635b183b1728f (patch)
tree16d767d2742cc37dc2c46a27ee200a3d1698d058 /storage.cpp
parentb0f8b28977e59b7fbfc1ce57ee5c102b8e4e0690 (diff)
Validate ids, server-side
Diffstat (limited to 'storage.cpp')
-rw-r--r--storage.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage.cpp b/storage.cpp
index 6060caf..92f274f 100644
--- a/storage.cpp
+++ b/storage.cpp
@@ -14,7 +14,7 @@ Storage::Storage(const Config& config):
m_db(config.getDataPath() + "/whiteboard.db3", SQLite::OPEN_READWRITE | SQLite::OPEN_CREATE),
m_maxage(config.getMaxage()),
- // Note about VARCHAR(N): "SQLite does not impose any length restrictions"
+ // Note about VARCHAR(N): "SQLite does not impose any length restrictions" - handled elsewhere in application
m_stmt_create(m_db, "CREATE TABLE IF NOT EXISTS documents (id VARCHAR(16) PRIMARY KEY, value BLOB, rev INTEGER, cursorpos INTEGER, timestamp BIGINT)"),
m_stmt_getNumberOfDocuments(m_db, "SELECT COUNT(*) FROM documents"),
m_stmt_cleanup(m_db, "DELETE FROM documents WHERE timestamp + ? < ?"),