aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2025-01-15 14:44:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2025-01-15 14:44:26 +0200
commit92ef110bb927db685f4b7740d7e20e67eabe7e8d (patch)
treeaf60f827df94586f7c49a772690c09b4bd275319 /mod
parent4de6640c0d61a3c36a606eac01a8c2df8e212b03 (diff)
ci-github: Trim leading/trailing whitespaces in webhook secret
Diffstat (limited to 'mod')
-rw-r--r--mod/mod-ci-github.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx
index 139be68..67ab2a7 100644
--- a/mod/mod-ci-github.cxx
+++ b/mod/mod-ci-github.cxx
@@ -104,7 +104,10 @@ namespace brep
ifdstream is (p);
getline (is, webhook_secret_, '\0');
- if (webhook_secret_.empty ())
+ // Trim leading/trailing whitespaces (presumably GitHub does the
+ // same in its web UI).
+ //
+ if (trim (webhook_secret_).empty ())
fail << "empty webhook secret in " << p;
}
catch (const io_error& e)