mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-19 22:46:20 -05:00
* Read-only SQL query endpoint for advanced users POST /api/db/query runs one read-only statement; GET /api/db/schema describes the tables. Both are refused unless `allow_database_query: true` is set in wrolpi.yaml (there is no UI for it). The connection is opened with mode=ro and an authorizer that allows only reads; queries are interrupted after 10 seconds, rows are capped, and long values are truncated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Database queries cannot be enabled through the API, and use bounded memory The config update API refuses to change `allow_database_query`; only an edit of wrolpi.yaml on the WROLPi can enable queries. Query connections refuse values over 32 MB and rows over 100 columns, rows are read one at a time, and the response stops at 5 million characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * The database query setting can be changed like any other config WROLPi is meant to be as secure as a bookshelf in your home; a LAN user who can reach the API is trusted, so gating one key in the config API adds nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Database queries can search FTS5 tables on SQLite 3.46 FTS5 reads `PRAGMA data_version` through the authorizer when it opens a table on SQLite 3.46 (Debian 13), so every MATCH and the schema endpoint failed with "vtable constructor failed". A denied VACUUM INTO also explains itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * A config status test attaches the shared context it reads It passed only when an earlier test in the same worker had attached it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| blobs | ||
| collections | ||
| files | ||
| scripts | ||
| static/extensions | ||
| test | ||
| __init__.py | ||
| api_utils.py | ||
| bookmarks.py | ||
| bookmarks_api.py | ||
| captions.py | ||
| cmd.py | ||
| common.py | ||
| config_api.py | ||
| config_schema.py | ||
| conftest.py | ||
| contexts.py | ||
| dates.py | ||
| db.py | ||
| db_bootstrap.py | ||
| db_query.py | ||
| downloader.py | ||
| errors.py | ||
| events.py | ||
| flags.py | ||
| fts.py | ||
| jobs.py | ||
| lang.py | ||
| log_levels.py | ||
| logging_extra.py | ||
| media_path.py | ||
| perpetual.py | ||
| roland@learningselfreliance.com.gpg | ||
| root_api.py | ||
| schema.py | ||
| schema_ddl.py | ||
| scrape_downloader.py | ||
| speedtest.py | ||
| switches.py | ||
| tags.py | ||
| test_media_path.py | ||
| upgrade.py | ||
| vars.py | ||
| version.py | ||
| version.txt | ||