summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-06-13 22:09:20 +0200
committerdefault <nobody@localhost>2023-06-13 22:09:20 +0200
commitf5e437a100376e1468028b90fb570c343f4b6e0d (patch)
tree55ed7590f661c295fa0a2acc089a0b8c61b686a9 /http.c
parenta3d33bfd3f04536763df5a52dc9d0263b5eb3b33 (diff)
Fixed crash in check_signature().
Diffstat (limited to 'http.c')
-rw-r--r--http.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/http.c b/http.c
index 75769f2..6540dcc 100644
--- a/http.c
+++ b/http.c
@@ -132,6 +132,11 @@ int check_signature(snac *snac, xs_dict *req, xs_str **err)
char *pubkey;
char *p;
+ if (xs_is_null(sig_hdr)) {
+ *err = xs_fmt("missing 'signature' header");
+ return 0;
+ }
+
{
/* extract the values */
xs *l = xs_split(sig_hdr, ",");