Commit Graph

14 Commits

Author SHA1 Message Date
Peter Stuifzand
6fb4dc6ca8
Publish on hub.url, and answer with a status that means something
Some checks failed
continuous-integration/drone Build is failing
A publisher names the feed in hub.url (spec §7.1). This read hub.topic, which
belongs to subscribe and unsubscribe, so every compliant publisher sent a
notification the hub could not resolve: it logged "could not request topic :"
and returned 200 with an empty body. Nothing was ever delivered, and the
status said the opposite. hub.topic is still read, but only when hub.url is
missing.

The rest is the same class of bug — a response that reported success for work
that did not happen:

- a publish with no topic is 400, a topic that does not answer 2xx is 502,
  and a subscriber is told nothing about either;
- the fetched body is bounded, its response closed, and a callback is retried
  once with the outcome logged instead of assuming the first POST landed;
- unsubscribe wrote 200 and then an error body into the same response; it now
  answers once;
- the challenge comes from crypto/rand and must be echoed exactly, since a
  substring match let any page that mentioned it pass verification;
- pq.Error implements error on the pointer, so the value assertion never
  compiled; the statement now type-asserts the pointer;
- the database password can come from HUB_DB_PASSWORD instead of only being
  baked into the binary.

The build moves to go.mod and golang:1.22, because io.Discard does not exist
in the 1.12 image the pipeline was pinned to.
2026-11-08 01:20:53 +01:00
6c63ba052b Add type: docker to .drone.yml 2021-10-21 22:15:27 +02:00
d75e55ec49 Fix deployment target in .drone.yml
All checks were successful
continuous-integration/drone/push Build is passing
2019-03-18 22:08:02 +01:00
4c1734095e Build hubserver
Some checks failed
continuous-integration/drone/push Build is failing
2019-03-18 21:55:48 +01:00
f53c832859 Cleanup .drone.yml
Some checks failed
continuous-integration/drone/push Build is failing
2019-03-18 21:48:05 +01:00
2808530540 Fix typo in .drone.yml
All checks were successful
the build was successful
2018-08-05 18:03:55 +02:00
b8dc97ff86 Build from git.p83.nl
Some checks failed
the build failed
2018-08-05 18:03:06 +02:00
bde593b909 Fix request, remove done step 2018-01-30 21:13:21 +01:00
349e5c7488 Add sh 2018-01-30 21:07:14 +01:00
d1f2b7da09 Fix .drone.yml perhaps 2018-01-30 21:05:55 +01:00
b25a1d4733 Add deployment complete step 2018-01-30 20:58:23 +01:00
0e080dd0a2 Add auto deployment 2018-01-29 22:00:29 +01:00
0f55fb2305 Add Dockerfile to build docker image for hubserver 2018-01-29 21:53:20 +01:00
05a0114efb Add drone.yml 2018-01-29 21:47:02 +01:00