📝 Changelog for v0.15.0
Search now works for short words and ranks whole words first, admins get a
Display settings page (page width, subpage count), and the editor and page panel
got several improvements. The release also contains security fixes and HTTP
hardening, so please upgrade, and check the behavior changes if you run LeafWiki
behind a reverse proxy or embed it elsewhere.
🌟 Highlights
- Search from two characters, a syntax help button, and whole-word matches
ranked first. (#1838, #1841, #1840) - Display settings (#1779): Settings → Display with a
widepage width and an
optional subpage count at sections. (#1813, #1821, #1824) - Highlights in the page panel: every
==highlight==listed, click to jump.
(#1521, #1794) - Editor: browser spell check with a toolbar toggle (#1731, #1784, #1805), Tab
after a list marker indents (#1725, #1765), underscores in slugs (#1775, #1828). - Public wikis: link previews and search engines get a proper page title,
description and content. (#1292, #1757, #1759, #1785, #1786, #1789, #1791,
#1793, #1796, #1827) - Fixes: inline code in headings and tables (#1750, #1815), links to headings
on other pages (#1807), search panel over dialogs (#1806), section creation with
Enter (#1816), save responses landing in the wrong page (#1720), Git backup
first sync (#1718), atomic writes on Windows (#1747), smaller binaries (#1734).
⚠️ Behavior changes
- No embedding on other origins:
X-Frame-Options: SAMEORIGINand CSP
frame-ancestors 'self'. Opt out with--disable-security-headers. - Scripts only from the wiki's own origin (CSP
script-src 'self'), unless
--inject-code-in-headercontains a script; a startup warning says so. - List your reverse proxy in
--trusted-proxy-ips: otherwise the access log,
rate limits and login backoff see the proxy address for everyone.
X-Forwarded-Prefixis ignored; use--base-path. - No hard account lockout: wrong passwords slow down only that client (5 s
doubling to 15 min); throttled logins answer "Invalid credentials" and
auth_account_lockedis gone. - Resending an invite invalidates the earlier invite email.
- Public wikis:
/redirects (302) to the first page;/robots.txtand
/sitemap.xmlare real responses (robots.txt has no effect under
--base-path); responses carryVaryandCache-Control: no-cache; an invalid
--public-urlwithout SMTP only logs a warning. - Search: queries over 256 characters or 12 terms are rejected,
limit≤ 100,
offset≤ 10 000, 503 after 10 s; lower-caseand/or/notare plain words;
the match tint needs Chrome/Edge 105+, Safari 17.2+ or Firefox 140+. - Content:
classin raw HTML is dropped except names Markdown features use;
Mermaid labels lose inlinestyleandclass; KaTeX square roots and arrows
now render. - Zip limits: imports over 50 000 and uploaded restores over 200 000 files and
folders are rejected; restore larger backups by id or offline. - Settings: "Table of contents" is now Display at
/settings/display(old
links redirect); editor spell check is on by default.
🔒 Security fixes
- GHSA-pwc8-r72c-jw55: a stale invite link could overwrite an account's password and sign in without TOTP
- GHSA-p295-c79q-qjg7: an avatar image could exhaust server memory while decoding
- GHSA-w87v-fp36-g757: the login lockout revealed accounts and let anyone lock out a user
- GHSA-wqx4-cxxw-57x2: page content could overlay the app with a working form
Also hardened: security headers and a CSP, uploaded scripts served as
application/octet-stream, zip entry caps, import uploads spooled to disk, and
search limits with a deadline. Thanks to @zorak1103 and @odykyi for the reports.
💛 Thanks to our sponsors
A heartfelt thank you to everyone supporting LeafWiki via GitHub Sponsors & Ko-fi.
If LeafWiki is useful to you or your team, a sponsorship really helps keep it going: GitHub Sponsors or a one-time coffee on Ko-fi.
🙌 Thanks to contributors
@zorak1103, @lboehm, @entorb, @TuboLax, @TejasS1233, and @SpotlessOrel — for the
security fixes, Windows CI and API docs, share link groundwork, underscore slugs
and a smaller binary, list indentation, and editor fixes in this release.
Contributions like these are what make LeafWiki better than one person could build
alone.
✨ Features
- feat(http): restrict scripts in the app shell to the same origin (zorak1103)
- feat(http): add security headers to the app shell and API (zorak1103)
- feat(http): resolve the client address through the trusted proxies (zorak1103)
- feat(search): search from two characters and explain the query syntax (Patrick Erber)
- feat(sqliteutil): let a store report an unusable database to its policy (Patrick Erber)
- feat(seo): show the crawler body in a browser with ?ssr (Patrick Erber)
- feat(display): show the number of subpages at sections (Patrick Erber)
- feat(display): configurable page content width (#1821) (Patrick Erber)
- feat(editor): toolbar toggle for the browser spellcheck (Patrick Erber)
- feat(shares): serve the navigation of a share link (Lukas Böhm)
- feat(scopedread): add a tree reader for a scope's navigation (Lukas Böhm)
- feat(tree): read a node's subtree routes in one locked walk (Lukas Böhm)
- feat(seo): put the rendered page into #root for search-engine crawlers (Patrick Erber)
- feat(viewer): highlights section in the page panel (Patrick Erber)
- feat(seo): mark unknown shell routes noindex (Patrick Erber)
- feat(seo): canonical link for /p/:id permalinks (Patrick Erber)
- feat(render): render sanitized page HTML for crawlers (Patrick Erber)
- feat(seo): serve page Markdown for Accept: text/markdown (Patrick Erber)
- feat(seo): serve robots.txt and sitemap.xml (Patrick Erber)
- feat(pages): list the routes of all pages and sections (Patrick Erber)
- feat(shares): serve shared pages read-only (Lukas Böhm)
- feat(http): add a capability route group without identity (Lukas Böhm)
- feat(editor): enable the browser's native spellcheck (Patrick Erber)
- feat(cli): check --public-url without SMTP (Patrick Erber)
- feat(seo): page meta tags for public wikis (Patrick Erber)
- feat(excerpt): add FromBodyStart for per-request excerpts (Patrick Erber)
- feat(seo): redirect / to the first page in public wikis (Patrick Erber)
- feat: allow slug to contain underscore (Torben)
- feat(sharing): add share link store and service (Lukas Böhm)
- feat(scopedread): add read scope and single-page reader (Lukas Böhm)
- feat(tree): add IsInSubtree structural query (Lukas Böhm)
- feat(scripts): list Behavior-Change trailers at the top of the changelog (#1717) (Patrick Erber)
- feat(api): experimental Swagger 2.0 skeleton with health and route coverage (#1682) (Stefan)
🐛 Bug Fixes
- fix(http): ignore X-Forwarded-Prefix in the trailing-slash redirect (Patrick Erber)
- fix(assets): serve uploaded scripts as application/octet-stream (zorak1103)
- fix(search): bound limit and offset (zorak1103)
- fix(shared): cap the number of zip entries on extraction (zorak1103)
- fix(importer): parse the import upload with a small memory limit (zorak1103)
- fix(ui): find the Mermaid sandbox and the layout portal targets by reference (zorak1103)
- fix(preview): drop the name of images in rendered content (zorak1103)
- fix(preview): allow only known class names in rendered content (zorak1103)
- fix(preview): render math after sanitizing (zorak1103)
- fix(preview): forbid form controls and inline style in Mermaid labels (zorak1103)
- fix(security): key the rate limiters on the resolved client address (zorak1103)
- fix(auth): replace the hard lock on the password step with a decaying backoff (zorak1103)
- fix(auth): take as long to reject a locked account as a wrong password (zorak1103)
- fix(auth): answer a locked account like invalid credentials (zorak1103)
- fix(avatar): answer an oversized avatar with a localized error (Patrick Erber)
- fix(avatar): bound the memory an avatar upload can make the server decode (Patrick Erber)
- fix(http): redact token query parameters in the request log (zorak1103)
- fix(auth): reject an invite token once the password is set (zorak1103)
- fix(search): cancel search queries with the request context and a deadline (Patrick Erber)
- fix(search): reject over-long search queries (Patrick Erber)
- fix(viewer): highlight the search match without changing the page DOM (Patrick Erber)
- fix(search): keep long queries clear of the clear button (Patrick Erber)
- fix(search): clear the loading state when a retyped query matches the last search (Patrick Erber)
- fix(search): treat only upper-case AND/OR/NOT as operators (Patrick Erber)
- fix(search): rank whole-word matches above prefix-only matches (Patrick Erber)
- fix(search): strip highlight marker characters from indexed text (Patrick Erber)
- fix(hotkeys): unregister the caller's own hotkey, not the top entry (Patrick Erber)
- fix(search): persist the search index across restarts (Patrick Erber)
- fix: slug overwrite (#1828) (Torben)
- fix(page): keep the current page when a section is created with Enter (Patrick Erber)
- fix(preview): keep wrapped inline code on the text baseline in tables (Patrick Erber)
- fix(preview): keep the heading anchor on links to other pages (Patrick Erber)
- fix(restore): make SelfRestart lint-clean on Windows (Patrick Erber)
- fix(editor): keep the search panel below dialogs (Patrick Erber)
- fix(render): bound render cost and fail closed outside the policy (Patrick Erber)
- fix(render): keep rendered HTML inside #root (Patrick Erber)
- fix(i18n): keep in sync with the UI language (Patrick Erber)
- fix(http): answer HEAD on favicon.ico and avatars like GET (Patrick Erber)
- fix(http): answer HEAD on SPA routes like GET without a body (Patrick Erber)
- fix(viewer): keep the shell's page title while the page loads (Patrick Erber)
- fix(editor): Tab indents list items at the start of a line (#1765) (TuboLax)
- fix: make-e2e-local fails on macos: Control+h -> ControlOrMeta+h (Torben)
- fix(pages): answer a blank page ID with 400 page_missing_id (Patrick Erber)
- fix(preview): scale inline code with the heading font size (Tejas)
- fix(shared): keep atomic writes atomic on Windows (zorak1103)
- fix(cli): validate port flags when the command line is parsed (#1722) (Patrick Erber)
- fix(slug): stop infinite loop on titles without usable characters (OrelFromRHD)
- fix(backup): retry first-contact sync after a failed first start (Patrick Erber)
- fix(deps): bump dompurify from 3.4.16 to 3.4.17 (Patrick Erber)
- fix(pages): rewrite incoming links only after the refactor passes its version check (Patrick Erber)
- fix(editor): apply a save response only to the editor session that saved (Patrick Erber)
- fix(release): keep the oldest commit in the generated changelog (Patrick Erber)
⚡ Performance
- perf(e2e): E2E speedup by parallel workers and loginViaApi (Torben)
Plus 149 internal changes (refactoring, tests, CI, build and developer docs) that don't change how LeafWiki behaves. Full list: v0.14.2...v0.15.0