Skip to content

2.42.0

Choose a tag to compare

@NTDLS NTDLS released this 17 Nov 16:00
· 18 commits to main since this release

👉 Please see upgrade notes at the bottom before upgrading an existing installation 👈

For plugin development, be sure to check out the NuGet Package 📦

📌 This is a substantial upgrade that includes some important long overdue changes, primarily moving the file attachments outside if the SQLite database. For this reason, you should backup your SQLite databases prior to upgrading because reverting to the previous version without the backups is not a simple task.

📢 This release is almost wholly due to the contributions of @maidis, thought I should mention that! 👍

New 🎉

  • Attachments are now stored as files on disk instead of inside pages.db. The database keeps only the file details. Files are stored as data/Attachments/{FileId}/{Revision}.{ext}, keeping their original extension, and every revision is still kept.
  • Existing attachments are moved out of the database onto disk automatically, a little at a time in the background after the site starts. Attachments that have not been moved yet keep working from the database in the meantime.
  • Large file uploads are sent in pieces, with a progress bar, automatic retry and a Cancel button. An upload that is interrupted, even by a site restart, picks up where it left off.
  • New ##Video function plays an uploaded video on the page. It accepts a width, a poster image (another attachment shown before the video plays) and :loop, :autoplay and :muted options.
  • New ##Audio function plays an uploaded audio file on the page.
  • QuickTime videos (.mov files from phones and cameras) play in the browser, with a download link in case the browser cannot play one. Formats a browser cannot play at all are shown as a download link.
  • "Copy Name" button on the page attachments list, to copy just a file name (for example, to use as a video's poster).
  • Database backups can now include attachment files ("Create with Attachments" under Admin, Database Backups).
  • New AttachmentPath setting in appsettings.json to store attachments somewhere other than data/Attachments.

Changed 😎

  • The default maximum attachment size has been raised from 5MB to 4GB.
  • ##File link text is now optional and defaults to the file name.
  • The "no permission" page now has a "Return to Home Page" button (formerly "Continue"), and a "Log In" button for visitors who are not signed in that brings them back to the page they were trying to open.
  • The Log In link at the top of every page returns you to the page you were on.
  • Images larger than 64MB are sent as they are instead of being resized in memory.
  • Updated dependencies, including MailKit 5.0.

Fixed 🐛

  • Security: images could be viewed by users without read permission on the page when the image had already been cached.
  • Security: login redirects could send users to another site.
  • Security: file names, image text, link text and wiki error messages are now escaped, so they cannot add script or HTML to a page.
  • ##Image and ##File can refer to a page in the same namespace by its short name (for example, ##Image(Gallery/logo.png) from another page in the same namespace).
  • The ^^ (upsize) markup produced invalid CSS on systems that use a comma as the decimal separator. (#109)

Upgrade notes 👀

  • The site's application pool user needs write permission on data/Attachments (or wherever AttachmentPath points).
  • After upgrading, pages.db stays its original size even once all attachments have moved out of it. It is not shrunk automatically.
  • When upgrading an existing site, do not copy the release's data folder over your own. The release's data/Attachments holds the built-in help images, and its files would overwrite your attachments that have the same numbers.