Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ thing itself — a card naming the app, with a Connect button.
access that was withdrawn. An app shared across the deployment still says to ask an administrator,
since the person reading cannot connect it.

### No-sign-in startup rejects addresses without a host

With `OPENBOT_SINGLE_USER=true`, an address such as `example.com:3010` in `OPENBOT_PUBLIC_URL`,
`OPENBOT_APP_URL` or `TRUSTED_ORIGINS` now refuses startup. It previously counted as a private
network address and only warned, even though the missing URL scheme left its host unidentified.

### A reply's tool calls fold into one line

A Bot that searched, read two pages and checked Drive before answering drew four lines above its
Expand Down
1 change: 1 addition & 0 deletions server/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ function reachOf(raw: string): Reach {
return "public";
}
bare = bare.replace(/^\[|\]$/g, "").replace(/\.+$/, "");
if (!bare) return "public";

if (
bare === "localhost" ||
Expand Down
9 changes: 9 additions & 0 deletions server/tests/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,15 @@ describe("deployment configuration", () => {
{ TRUSTED_ORIGINS: "http://localhost:3010,https://openbot.example.com" },
],
["an address that is not a URL at all", { OPENBOT_PUBLIC_URL: "openbot" }],
[
"a public URL missing its scheme",
{ OPENBOT_PUBLIC_URL: "example.com:3010" },
],
["an app URL missing its scheme", { OPENBOT_APP_URL: "example.com:3010" }],
[
"a trusted origin missing its scheme",
{ TRUSTED_ORIGINS: "http://localhost:3010,example.com:3010" },
],
])("refuses no sign-in combined with %s", (_label, published) => {
expect(() =>
loadConfig({ ...withoutSignIn, ...OPEN, ...published }),
Expand Down
Loading