Repository navigation
📝 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 (@perber)
- feat(sqliteutil): let a store report an unusable database to its policy (@perber)
- feat(seo): show the crawler body in a browser with ?ssr (@perber)
- feat(display): show the number of subpages at sections (@perber)
- feat(display): configurable page content width (#1821) (@perber)
- feat(editor): toolbar toggle for the browser spellcheck (@perber)
- feat(shares): serve the navigation of a share link (@lboehm)
- feat(scopedread): add a tree reader for a scope's navigation (@lboehm)
- feat(tree): read a node's subtree routes in one locked walk (@lboehm)
- feat(seo): put the rendered page into #root for search-engine crawlers (@perber)
- feat(viewer): highlights section in the page panel (@perber)
- feat(seo): mark unknown shell routes noindex (@perber)
- feat(seo): canonical link for /p/:id permalinks (@perber)
- feat(render): render sanitized page HTML for crawlers (@perber)
- feat(seo): serve page Markdown for Accept: text/markdown (@perber)
- feat(seo): serve robots.txt and sitemap.xml (@perber)
- feat(pages): list the routes of all pages and sections (@perber)
- feat(shares): serve shared pages read-only (@lboehm)
- feat(http): add a capability route group without identity (@lboehm)
- feat(editor): enable the browser's native spellcheck (@perber)
- feat(cli): check --public-url without SMTP (@perber)
- feat(seo): page meta tags for public wikis (@perber)
- feat(excerpt): add FromBodyStart for per-request excerpts (@perber)
- feat(seo): redirect / to the first page in public wikis (@perber)
- feat: allow slug to contain underscore (@entorb)
- feat(sharing): add share link store and service (@lboehm)
- feat(scopedread): add read scope and single-page reader (@lboehm)
- feat(tree): add IsInSubtree structural query (@lboehm)
- feat(scripts): list Behavior-Change trailers at the top of the changelog (#1717) (@perber)
- feat(api): experimental Swagger 2.0 skeleton with health and route coverage (#1682) (@zorak1103)
🐛 Bug Fixes
- fix(http): ignore X-Forwarded-Prefix in the trailing-slash redirect (@perber)
- 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 (@perber)
- fix(avatar): bound the memory an avatar upload can make the server decode (@perber)
- 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 (@perber)
- fix(search): reject over-long search queries (@perber)
- fix(viewer): highlight the search match without changing the page DOM (@perber)
- fix(search): keep long queries clear of the clear button (@perber)
- fix(search): clear the loading state when a retyped query matches the last search (@perber)
- fix(search): treat only upper-case AND/OR/NOT as operators (@perber)
- fix(search): rank whole-word matches above prefix-only matches (@perber)
- fix(search): strip highlight marker characters from indexed text (@perber)
- fix(hotkeys): unregister the caller's own hotkey, not the top entry (@perber)
- fix(search): persist the search index across restarts (@perber)
- fix: slug overwrite (#1828) (@entorb)
- fix(page): keep the current page when a section is created with Enter (@perber)
- fix(preview): keep wrapped inline code on the text baseline in tables (@perber)
- fix(preview): keep the heading anchor on links to other pages (@perber)
- fix(restore): make SelfRestart lint-clean on Windows (@perber)
- fix(editor): keep the search panel below dialogs (@perber)
- fix(render): bound render cost and fail closed outside the policy (@perber)
- fix(render): keep rendered HTML inside #root (@perber)
- fix(i18n): keep in sync with the UI language (@perber)
- fix(http): answer HEAD on favicon.ico and avatars like GET (@perber)
- fix(http): answer HEAD on SPA routes like GET without a body (@perber)
- fix(viewer): keep the shell's page title while the page loads (@perber)
- 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 (@entorb)
- fix(pages): answer a blank page ID with 400 page_missing_id (@perber)
- fix(preview): scale inline code with the heading font size (@TejasS1233)
- fix(shared): keep atomic writes atomic on Windows (@zorak1103)
- fix(cli): validate port flags when the command line is parsed (#1722) (@perber)
- fix(slug): stop infinite loop on titles without usable characters (@SpotlessOrel)
- fix(backup): retry first-contact sync after a failed first start (@perber)
- fix(deps): bump dompurify from 3.4.16 to 3.4.17 (@perber)
- fix(pages): rewrite incoming links only after the refactor passes its version check (@perber)
- fix(editor): apply a save response only to the editor session that saved (@perber)
- fix(release): keep the oldest commit in the generated changelog (@perber)
⚡ Performance
- perf(e2e): E2E speedup by parallel workers and loginViaApi (@entorb)
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