Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs: say boot logs a schemeless S3 endpoint and the save refuses it

Yudhi Armyndharis7c7aa88d8ee0
diff --git a/.env.example b/.env.example
index 1114bee73..cbece88bd 100644
--- a/.env.example
+++ b/.env.example
@@ -438,7 +438,8 @@ DATABASE_SYNCHRONIZE=false # WARNING: Set false in production! (data DB
# starts the bundled container and nothing else, so a hand-edited file still needs the keys set.
# S3_ENDPOINT is OPTIONAL: leave it unset for standard AWS S3 (derived from region); set it only for
# an S3-compatible store (MinIO, R2, …), which also enables path-style addressing. A set value must
-# be an absolute http:// or https:// URL; the app refuses to start without the scheme.
+# be an absolute http:// or https:// URL; without the scheme the app logs an error at start and keeps
+# the local directory.
# S3_ENDPOINT=http://localhost:9000 # uncomment / set ONLY for an S3-compatible store (MinIO, R2)
# S3_BUCKET=openwa
# S3_REGION=us-east-1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 35fd089b8..1da6efd8b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -54,7 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Serve every page after the first of `GET /api/sessions/{sessionId}/chats` and `GET /api/sessions/{sessionId}/contacts` from the list the engine returned within the last 5 s, so walking a large account costs one engine read instead of one per page.
- Name the Go SDK status font constants after the WhatsApp protocol (`StatusFontSystemText`, `StatusFontFBScript`, `StatusFontMorningBreezeRegular`, `StatusFontCalistogaRegular`, `StatusFontExo2ExtraBold`, `StatusFontCourierPrimeBold`), from Go SDK 0.7.0; the old names, which did not match the font each id selects, stay as deprecated aliases.
- Refuse to start with `REDIS_TLS=true` or a `REDIS_USERNAME` other than `default` beside the built-in Redis, which serves plain TCP and only its default user, where every Redis connection failed; the Infrastructure page refuses to save that combination.
-- Refuse to start with `STORAGE_TYPE=s3` and an `S3_ENDPOINT` that is not an absolute `http://` or `https://` URL, where every S3 call failed and media went to local disk; the Infrastructure page refuses to save it.
+- Log an error at start for `STORAGE_TYPE=s3` with an `S3_ENDPOINT` that is not an absolute `http://` or `https://` URL, where every S3 call failed and media went to local disk, and refuse to save it from the Infrastructure page.
### Fixed
@@ -307,7 +307,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Keep a plugin's registry entry until its uninstall has removed its files, so a failed uninstall can be repeated.
- Carry a plugin's stored data into the new tree before an update swaps it in.
- Refuse a plugin catalog entry whose id, name, version or text fields are not text, and accept null in its optional fields.
-- Log once each `SSRF_ALLOWED_HOSTS` entry that carries a scheme, port, path or wildcard, which never matches a host.
+- Log at start the position and reason of each `SSRF_ALLOWED_HOSTS` entry that never matches a host: a scheme, credentials, port, path or wildcard, or an IP address not written as the URL parser prints it (`127.0.0.1`, not `127.1`).
- Run every `message:sending` handler, a moderation veto included, for a send that a hook handler schedules after its own call has ended; it was skipped as re-entrant.
- Redrive only the dead letters written under an ingress instance's current session binding.
- Drop a null optional field from plugin catalog entries instead of answering it.
@@ -350,7 +350,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `envPinned` of `GET /api/infra/status` can list any of the 31 settings a save of the Infrastructure page writes, where 0.25.0 listed eight; a client that reads it must expect the database, Redis and S3 keys and the built-in flags too.
- The dashboard status composer offers only fonts 0 to 7 on whatsapp-web.js, which posts 8 to 10 in the default font; the API still accepts every font id.
- A boot with `REDIS_TLS=true` or a named `REDIS_USERNAME` beside the built-in Redis (`REDIS_BUILTIN=true` with the bundled host) is refused; set `REDIS_TLS=false` and clear the username, or use an external Redis.
-- A boot with `STORAGE_TYPE=s3` and an `S3_ENDPOINT` without `http://` or `https://` (for example `minio:9000`) is refused; add the scheme.
+- A boot with `STORAGE_TYPE=s3` and an `S3_ENDPOINT` without `http://` or `https://` (for example `minio:9000`) still starts, on the local media directory, and logs an error; add the scheme.
- `POST /api/sessions/{sessionId}/groups/{groupId}/membership-requests/approve` and `/reject` answer `400` for a JSON list body or a content type other than JSON or form encoding; they used to act on every pending request. Send `{}` or no body for that.
- On whatsapp-web.js, `POST /api/sessions/{sessionId}/pairing-code` answers `409` for a number that is the stored phone of another session of the gateway.
- On SQLite the first boot checks the message search index against all stored text and rebuilds it when they differ, so a large database starts more slowly while the port is closed.
diff --git a/docs/06-api-specification.md b/docs/06-api-specification.md
index b1ee5f9cf..0d3d5d092 100644
--- a/docs/06-api-specification.md
+++ b/docs/06-api-specification.md
@@ -5768,7 +5768,7 @@ Built-in flags: a section sent without `builtIn` follows its stored host or endp
}
```
-Write/IO errors are caught and returned as HTTP `200` with `{ "saved": false, "envPath": "", "profiles": [], "message": "Failed to save configuration: …" }`. DTO validation, an unknown engine type, an invalid `database.schema`, CR/LF injection, a value that cannot be stored so that it reads back unchanged, and a merged config the production boot guard would reject (an empty or default `DATABASE_PASSWORD` or S3 key on an external datastore, or a placeholder `REDIS_PASSWORD`; message starts `Refusing to save a configuration that would be rejected at production boot.`), and a merged config the boot environment validation rejects, such as a PostgreSQL selection without a host, a pool size that is not an integer, `REDIS_TLS=true` beside the built-in Redis or an `S3_ENDPOINT` that is not an `http(s)` URL while `STORAGE_TYPE=s3` (message starts `Refusing to save a configuration that fails boot validation.` and carries the boot message), and a local `storage.localPath` the app cannot create or write (message starts `Refusing to save the storage path`; the next start would refuse to boot on it, and a path pinned by the host environment or the project `.env` is not judged, as the boot never reads the submitted one) are real HTTP `400` responses, and nothing is written. `profiles` lists newly-required Docker profiles.
+Write/IO errors are caught and returned as HTTP `200` with `{ "saved": false, "envPath": "", "profiles": [], "message": "Failed to save configuration: …" }`. DTO validation, an unknown engine type, an invalid `database.schema`, CR/LF injection, a value that cannot be stored so that it reads back unchanged, and a merged config the production boot guard would reject (an empty or default `DATABASE_PASSWORD` or S3 key on an external datastore, or a placeholder `REDIS_PASSWORD`; message starts `Refusing to save a configuration that would be rejected at production boot.`), and a merged config the boot environment validation rejects, such as a PostgreSQL selection without a host, a pool size that is not an integer, `REDIS_TLS=true` beside the built-in Redis or, in a save that names `STORAGE_TYPE` or `S3_ENDPOINT`, an `S3_ENDPOINT` that is not an `http(s)` URL while `STORAGE_TYPE=s3` (boot only logs it; message starts `Refusing to save a configuration that fails boot validation.` and carries the boot message), and a local `storage.localPath` the app cannot create or write (message starts `Refusing to save the storage path`; the next start would refuse to boot on it, and a path pinned by the host environment or the project `.env` is not judged, as the boot never reads the submitted one) are real HTTP `400` responses, and nothing is written. `profiles` lists newly-required Docker profiles.
**Errors:** `400` unknown/mistyped body field, a `database.type`/`storage.type` left out with none stored or pinned, unknown
`engine.type`, invalid `database.schema`, CR-LF in a value, a value that cannot round-trip through the