aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael McVady <femtonaut@gmail.com>2023-07-08 11:42:23 -0500
committerMichael McVady <femtonaut@gmail.com>2023-07-08 11:42:23 -0500
commit6c95c9152b466bdb30d7226001bb790a8e8c7c5b (patch)
tree6016df20546c8ad5683be25ff6ea92567fb3600e
parentb5c64ec289fe9e07603b3da5f3d246bf88c8a124 (diff)
Use latest kore RC to fix `http_populate_post`/`textarea` issue
-rw-r--r--Dockerfile2
-rw-r--r--README.md12
-rw-r--r--assets/post_edit.html4
-rw-r--r--conf/build.conf2
-rw-r--r--src/clog.c3
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 @@
-<form action="/form" method="post" enctype="multipart/form-data">
+<form action="/form" method="post">
<dl>
<dt><h3>id</h3></dt>
<dd><input type="text" id="id" name="id"></input></dd>
@@ -8,4 +8,4 @@
<dd><textarea id="body" name="body"></textarea></dd>
<dd><input type="submit" value="Edit"></dd>
</dl>
-</form> \ No newline at end of file
+</form>
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);