mirror of
https://github.com/aziascreations/BakaShrot.git
synced 2026-11-23 20:58:46 +01:00
Made the roles the only lists of topics, Refused PRAGMAs in queries
- Removed `[server] topics` and `[replication] replicated_topics`: a push is taken by its roles' `push_topics`, a replicated message by the peer's `accept_topics`; a topic exists from its first message. - Topics that only came from a peer are read and listed like any other; `ListNames` lists the topics with messages, filtered by the roles. - A push to a topic no role names is `NotAllowed`; `UnknownName` is only for nodes. - Clients' queries: every PRAGMA refused as it's prepared (SQLite's authorizer), `PRAGMA query_only = 0` used to take effect. - Noted the leads found by reading the code in `docs/known-issues.md`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
+6
-2
@@ -109,7 +109,7 @@ read while the writer writes. Answers are the protocol's own types:
|
||||
|
||||
A topic and node with no messages read as none, unless the node has none
|
||||
in any topic: `Error::UnknownName`, as the old server refused unknown
|
||||
nodes. Whether a topic is known is the server's (the config's topics).
|
||||
nodes. A topic is never unknown: it's allowed or not, by the roles.
|
||||
|
||||
## Attachments
|
||||
|
||||
@@ -140,7 +140,11 @@ afterwards, `purge_attachments(max_parts)` a batch at a time.
|
||||
|
||||
Clients' `Query` runs on `Database::query_runner()`, read-only three ways:
|
||||
the connection is `query_only`, the statement must be one SQLite says only
|
||||
reads, and one statement only (more is refused, not ignored). The result is
|
||||
reads, and one statement only (more is refused, not ignored). PRAGMAs are
|
||||
refused as they're prepared ("not authorized", SQLite's authorizer), the
|
||||
`pragma_*` table functions too: some take effect at that point, and
|
||||
`PRAGMA query_only = 0`, though refused, turned `query_only` off for the
|
||||
connection's next queries (found 2026-11-15). The result is
|
||||
`{"columns":[...],"rows":[[...]]}`, every value a string or null (blobs in
|
||||
hex), 10,000 rows and 16 MB at most (`TooBig`). A failing row fails it all,
|
||||
with SQLite's message: never a partial result. "malformed JSON" (a JSON
|
||||
|
||||
Reference in New Issue
Block a user