Compare commits

...
Author SHA1 Message Date
MickLesk 5b7de9c71d Obsidian LiveSync: refuse anonymous requests to CouchDB
require_valid_user was set only under [chttpd_auth], which CouchDB 3 does
not enforce, so the server root and Fauxton answered without credentials.
It now sits under [chttpd] as in upstream's init script, with
chttpd enable_cors; updates add both to existing installs.
2026-12-06 10:49:59 +01:00
2 changed files with 7 additions and 0 deletions

No files matched your search

+5
View File
@@ -45,6 +45,11 @@ function update_script() {
systemctl stop couchdb
restore_backup
# Only [chttpd] require_valid_user makes CouchDB 3 refuse anonymous requests
if ! sed -n '/^\[chttpd\]/,/^\[/p' /opt/couchdb/etc/local.d/obsidian-livesync.ini | grep -q '^require_valid_user'; then
sed -i '/^\[chttpd\]/a require_valid_user = true\nenable_cors = true' /opt/couchdb/etc/local.d/obsidian-livesync.ini
fi
msg_info "Starting CouchDB"
systemctl start couchdb
msg_ok "Started CouchDB"
+2
View File
@@ -60,6 +60,8 @@ admin = ${COUCHDB_PASSWORD}
bind_address = 0.0.0.0
port = 5984
max_http_request_size = 4294967296
require_valid_user = true
enable_cors = true
[chttpd_auth]
require_valid_user = true