From 6c95c9152b466bdb30d7226001bb790a8e8c7c5b Mon Sep 17 00:00:00 2001 From: Michael McVady Date: Sat, 8 Jul 2023 11:42:23 -0500 Subject: Use latest kore RC to fix `http_populate_post`/`textarea` issue --- Dockerfile | 2 +- README.md | 12 +++++++++++- assets/post_edit.html | 4 ++-- conf/build.conf | 2 +- src/clog.c | 3 +-- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 577b89d..e34e467 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM debian:bullseye-slim AS build-stage COPY . /tmp/clog -ARG KORE_VERSION=4.2.3 +ARG KORE_VERSION=4.3.0-rc2 RUN set -e \ && apt-get update -qq \ diff --git a/README.md b/README.md index 6e6e3bb..2f272fe 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,8 @@ seccomp_tracing no ## Bootstrapping the database -`psql` and load `db/db.sql`, `db/data.sql` for `db/data.sql`. +Use `psql` and load `db/db.sql` for models, +`db/data.sql` for some example data. ## TODO @@ -41,3 +42,12 @@ seccomp_tracing no 1. ~Only do HTTP stuff at the edge.~ 1. `PUT`/`PATCH`? posts. 1. pagination +1. HTML form for edits +1. Make h1 first class markdown citizen, (remove title) +1. Remove JSON API? +1. use sha256 hash to check kore blob + +## C? + +* https://chromium.googlesource.com/chromium/src/+/master/docs/security/rule-of-2.md +* https://verdagon.dev/blog/when-to-use-memory-safe-part-1 diff --git a/assets/post_edit.html b/assets/post_edit.html index 6635b87..cd2f920 100644 --- a/assets/post_edit.html +++ b/assets/post_edit.html @@ -1,4 +1,4 @@ -
+

id

@@ -8,4 +8,4 @@
-
\ No newline at end of file + diff --git a/conf/build.conf b/conf/build.conf index c669282..b9e19a8 100644 --- a/conf/build.conf +++ b/conf/build.conf @@ -5,7 +5,7 @@ # of a dynamic library. If you set this to yes you must also # set kore_source together with kore_flavor. single_binary=yes -kore_source=../kore-4.2.3 +kore_source=../kore-4.3.0-rc2 kore_flavor=PGSQL=1 TLS_BACKEND=none # The flags below are shared between flavors diff --git a/src/clog.c b/src/clog.c index fd784d2..8835d60 100644 --- a/src/clog.c +++ b/src/clog.c @@ -261,8 +261,7 @@ int post_form(struct http_request *req) { char *title = NULL; char *body = NULL; - http_populate_multipart_form(req); - // http_populate_post(req); + http_populate_post(req); if (http_argument_get_string(req, "id", &id)) { kore_log(LOG_INFO, "form id %s.", id); -- cgit v1.2.3