+2021-02-25 Frank Ch. Eigler <fche@redhat.com>
+
+ * debuginfod.cxx (handler_cb): Filter webapi for bad
+ artifacttype keywords early for metric hygiene.
+
2021-02-14 Frank Ch. Eigler <fche@redhat.com>
* debuginfod.cxx (main -U): Use bsdtar unconditionally. Also map
else if (artifacttype == "source") atype_code = "S";
else throw reportable_exception("invalid artifacttype");
+ inc_metric("http_requests_total", "type", artifacttype);
+
if (atype_code == "S" && suffix == "")
throw reportable_exception("invalid source suffix");
suffix = url_copy.substr(slash3); // include the slash in the suffix
}
- inc_metric("http_requests_total", "type", artifacttype);
// get the resulting fd so we can report its size
int fd;
r = handle_buildid(connection, buildid, artifacttype, suffix, &fd);
+2021-02-25 Frank Ch. Eigler <fche@redhat.com>
+
+ * run-debuginfod-find.sh: Add bad webapi artifacttype test.
+
2021-02-17 Frank Ch. Eigler <fche@redhat.com>
* run-debuginfod-find.sh: Tweak wait_ready() to also print -vvv log of
curl -s http://127.0.0.1:$PORT2/badapi > /dev/null || true
curl -s http://127.0.0.1:$PORT2/buildid/deadbeef/debuginfo > /dev/null || true
+# Confirm bad artifact types are rejected without leaving trace
+curl -s http://127.0.0.1:$PORT2/buildid/deadbeef/badtype > /dev/null || true
+(curl -s http://127.0.0.1:$PORT2/metrics | grep 'badtype') && false
########################################################################
# Corrupt the sqlite database and get debuginfod to trip across its errors