sirius-press/CHANGELOG.md
Local Dev c403a42904 sirius-press: let the sign-in screen move off wp-login.php
wp-login.php is the most-requested path on the internet. There is no
password here to guess, so this is not about brute force — it is that a
wallet login screen answering that path tells every scanner that goes
past exactly what is running, and serves a few hundred bots a day a page
they cannot use.

Setting a login address moves the screen and makes wp-login.php answer
404 through the theme's own template. A 404 and not a redirect: a
redirect would hand the new address to the first scanner that asked for
the old one. Everything that builds a login URL follows it, because they
all go through site_url() or network_site_url() with a wp-login.php
path, and there is a wp_redirect backstop for code that builds the URL
by hand.

Refusing wp-login.php has to happen at wp_loaded and has to end the
request there. The web server sends that path to the file directly
rather than through index.php, so by the time anything of ours runs we
are already inside its require of wp-load.php — rewriting $pagenow
changes what WordPress thinks the request is, but it does not stop the
script that is already running.

What this does not do is rename wp-admin. WordPress has no supported way
to, and faking it with a proxy and a filtered admin_url() gets most of
the way before breaking plugins quietly. Breaking plugins is the one
thing this fork promises not to do, so the setting says as much on the
screen rather than implying more than it delivers.
2026-10-03 18:42:45 +02:00

9.6 KiB

Changelog

0.1.0 — unreleased

First cut. Sirius Press installs, signs people in with a wallet, and publishes static copies of its pages to a BCNR name.

Accounts

  • Sign in by signing a challenge with a Bitcoin Cash key. The address is recovered from the signature, so nothing has to be typed but the signature itself.
  • Three ways to produce one: a wallet the browser already exposes (Theseus), a recovery phrase used once in the page and wiped, or a signature pasted in from any BIP-137 wallet. The last works with JavaScript disabled.
  • One-step registration — the signature is the confirmation, so there is no email round trip and no pending state.
  • Password sign-in stays on by default and can be turned off once every account has a wallet. The screen that turns it off refuses to do so while it would lock out the person asking.
  • No password reset, and the "lost password" page explains why rather than pretending otherwise.
  • /sirius-press/v1/confirm lets any plugin demand a fresh signature before something irreversible.

Publishing

  • Publishing a post exports it, the home page and its archives to the name's storage on Sia, signed BNS-SITE1.
  • Two signing modes: manual, where the browser signs and the server stores nothing, and automatic, where an encrypted phrase lets cron publish alone. Manual is the default.
  • Unchanged pages are hashed and skipped rather than re-uploaded.
  • Unpublishing a post removes its file from the mirror.
  • wp sirius export and wp sirius status for the command line.

Compatibility

  • Every account carries an unroutable .invalid placeholder user_email, so the thousands of ecosystem reads of that field keep returning a string.
  • Mail to those placeholders is captured into an in-app inbox. Mail to real addresses is passed through untouched, so SMTP works normally.
  • Shims for WooCommerce, Contact Form 7 and core's admin-email machinery.

Core

  • One change, 75 lines, in wp-admin/install.php: the setup wizard asks for a wallet address instead of an email address, and the address is optional.
  • WordPress is vendored at wordpress/ as a git subtree, already patched. Upstream releases arrive through git subtree merge against sirius-press/wordpress-upstream, a branch of pristine imports, so a release that touches code near the fork's change is three-way merged rather than re-derived by hand. tools/update-wordpress.sh <version> runs the whole thing.
  • patches/ is now generated from the tree by tools/refresh-patches.sh (with --check for CI) and exists to answer "what does this fork change in core?" without reading a 3,800-file log. It is documentation, not the build mechanism.

Packaging

  • install.sh for a fresh Ubuntu VPS; Docker stack with MariaDB, PHP-FPM and nginx. Core lives in the image, so rebuilding is a real upgrade.
  • tools/build.sh --zip for shared hosting.
  • tools/update-wordpress.sh to move onto a new upstream release.
  • tools/publish-release.sh to ship to both mirrors.

Fixed while testing against a live instance

  • Registration and wallet-linking accepted a signature over the wrong text. Public-key recovery always succeeds — it returns a different key rather than failing — so a mismatched signature silently bound an account to an address nobody could sign for. Both paths now require the claimed address and compare it to the recovered one. Sign-in was never exposed to this, because a wrong address simply matches no account.
  • URL rewriting mangled links on any site whose URL carries a port: the protocol-relative pass matched inside absolute URLs and doubled the scheme, and a host-only match left the port stranded. Both covered by tests now.
  • Translations loaded on plugins_loaded, which WordPress 6.7+ warns about on every request. Moved to init.
  • The Publishing screen now refuses to be quiet about plain permalinks, which would collapse an entire site onto one exported file.
  • Removed an is_email() filter that rested on a false premise: WordPress validates syntax, not whether a domain can exist, so .invalid addresses already pass and the filter never fired. The documentation said otherwise and has been corrected.

Fixed after opening it in a browser

  • Wallet sign-in did not work in a browser at all. WordPress marks its username and password inputs required; the wallet path leaves both empty on purpose, so the form refused to submit a valid signature and pointed a validation bubble at a field the visitor is not meant to fill in.
  • The hidden attribute was being overridden by WordPress's own button styles, so controls this plugin ships hidden were visible regardless — offering a browser wallet that is not there, and showing a JavaScript-only button to visitors without JavaScript.

WordPress 7.1.2

Taken through tools/update-wordpress.sh and merged cleanly; upstream did not touch the one file this fork patches. Two bugs in the update tool surfaced doing it: a Windows path-subtraction that produced an absolute --prefix, and git-subtree's refusal to run in a repository with any uncommitted file. The merge now runs in a scratch worktree and a failed run can be retried.

Fixed after deploying to a real VPS

  • Static export could never work in the bundled Docker stack. The exporter fetches each page over HTTP, and a container cannot reach the host's own published port on most Docker hosts — every export died with a cURL timeout while the site itself was plainly up. SIRIUS_PRESS_LOOPBACK_URL now points the exporter at the nginx service on the compose network, with the site's real Host header so the rendered page is unchanged and the internal address never reaches the output. The stack sets it by default.

The login address can move

  • Sirius Press → Sign-in now has a Login address field. Set it and the sign-in screen answers at https://yoursite/<slug>; wp-login.php answers 404, rendering the theme's own 404 page rather than redirecting, because a redirect would hand the new address to the first scanner that asked for the old one. Everything that builds a login URL follows — wp_login_url(), logout, lost password, registration, and the redirect auth_redirect() sends a logged-out visitor to wp-admin with.
  • Not about brute force: there is no password to guess. It is about wp-login.php being the most-requested path on the internet, and a wallet login screen answering it telling every scanner what runs here.
  • It does not rename wp-admin, and will not. WordPress has no supported way to do that — the path is built into ABSPATH . 'wp-admin/', into core's own asset loaders, and into a great deal of plugin JavaScript. A proxy plus a filtered admin_url() gets perhaps nine tenths of the way and then breaks plugins silently, which is the one thing this fork promises not to do.
  • Locked out? wp option delete sirius_press_login_slug puts it back, and SIRIUS_PRESS_LOGIN_SLUG in wp-config.php overrides the option for anyone who can still edit a file but not reach a browser.

Fixed while building a real site on it

  • Turning passwords off made the login screen fail on arrival. wp-login.php calls wp_signon() on its way to drawing the form, even for a plain GET, and core throws the result away only when the error codes are exactly the pair its own password filters produce. Removing those filters — which is the entire point of turning passwords off — left the generic authentication_failed behind, so every visitor met a red "Invalid username, email address or incorrect password" above a form with neither field, on a site with no passwords.

  • The paste-a-signature path had no way to submit. It borrowed core's login button, and the stylesheet that retires the password form was hiding that button along with it. So the one route meant for people whose keys live on another machine — sign in Electron Cash, paste the result — was a dead end precisely on the sites most likely to need it. It now carries its own submit button, which also makes the block work on the screens where there is no core login form to borrow from.

  • The username field outlived the password field. With passwords off, authenticate() never reads the username either, yet "Username or Email Address" stayed at the top of the form — the exact thing this fork exists to remove, in the first position a visitor looks. Both fields are now retired together, and their required attributes are cleared so a hidden field cannot silently refuse a submit.

  • The image had no wp-cli. docs/publishing.md documents wp sirius export and wp sirius status, and the export plugin registers both — on a stack built from docker/, neither existed. wp-cli is now in the image, pinned to a version and checked against its SHA-256; it is the only thing the build fetches, which is why it is the only thing that has to prove what it is.

Known gaps

  • No byte has yet been written to the real gateway under a registered name. The signing is verified against a transcription of the gateway's own verifier, and the live instance reads the correct on-chain owner from navigate.st, but the upload itself is untested.
  • Manual-mode publishing (browser signs and uploads) has not been clicked through; the server-signing path has.
  • Publishing is verified against a transcription of the gateway's own verification logic, not against navigate.st with a registered name.
  • Seven of the ten rows in the plugin compatibility matrix are reasoned rather than tested; the three named in the ship criteria were installed and run.