From 139f0cee972ecd2928b78fdbbc0635b183b1728f Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 12 Feb 2023 13:35:27 +0100 Subject: Validate ids, server-side --- storage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'storage.cpp') 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 + ? < ?"), -- cgit v1.2.3