This release contains further security hardening from another round of review using Claude Fable 5.2 and a CodeRabbit deep scan. It also has a new file uploader using native browser functionality, functional bug fixes and library upgrades. Given the extent of changes, it is probably best to do a clean install and copy your database, config, themes and uploads directory into the updated file structure.
I appreciate the temporary access to Fable 5.2 and the free deep scan offered by CodeRabbit. Both are worthy tools for cleaning up and ironing out your code base. This version is fully compatible with PHP 8.5. I also appreciate the Bootstrap-fileinput project / creator, which was my go to file uploader plugin for many years; this has been removed from Tuskfish as I only ever used a tiny part of its functionality, and my needs are now met via native functionality.
To do:
- There are a couple of very small changes needed to make it compatible with 8.6 and those will follow very soon.
- Google Maps functionality is currently broken, as Google has randomly removed support for KmlLayer and did not provide any form of replacement (thanks Google!). Building a work around looks like not too much work, so I will try and get this done shortly.
Download it here:
Security
Authentication and sessions
- The session ID now always changes on login, and the CSRF token no longer carries over from before login.
- The session cookie now only goes to the site's own hostname. It is no longer shared with subdomains.
- session.use_strict_mode is now set in code, so it applies whatever the server configuration says.
- Changing your password now requires your current password.
- Login timing no longer reveals whether an account exists. The login throttling cap was also reduced, since password length policy and passkeys are the real defence.
- Other sites can no longer force a user to log out via a bogus backlink.
- Anonymous visitors no longer get a session file or cookie unless the page needs one (efficiency).
WebAuthn / passkeys
- Passkeys now only work from the site's exact origin, so a passkey assertion obtained on a subdomain can no longer be relayed to log in.
- A passkey login started before a password change can no longer be completed after it.
- Failed passkey logins now count towards the login error counter, and passkey challenges now time out.
- Hardening in the bundled library: ByteBuffer can no longer restore arbitrary objects, and unused attestation formats are no longer processed.
Access control
- Original uploaded images can no longer be downloaded directly. Only resized copies are served, so a public thumbnail can't be used to fetch the full-size original of restricted content.
- Restricted videos in the Featured Video block are now protected by access groups, and pages showing them are not cached.
- Search no longer matches the descriptions of restricted content for users who can't read them.
- Search no longer returns offline content when you search for two or more terms with OR.
- Group masks are checked with bitmask tests and validated when stored.
- Custom RSS feed titles and descriptions now come only from online, public collections and tags.
Files and uploads
- Upload filenames are sanitised, and stored uploads get names that can't be guessed.
- Enclosures only stream files from inside the media directory with a permitted extension.
- Expired attachments can no longer be downloaded. Previously the expiry date was compared incorrectly.
- A trust_path/.htaccess with "deny all" was added, in case trust_path ends up inside the web root.
Other
- The installer refuses to run again once a database is configured.
- Pages are not cached if they have invalid or unused parameters, contain the session token, show a "no such content" message, or were rendered for an editor or admin.
- Searches are capped at 10 terms.
- The URL, integer, string, traversal and token validators are stricter.
- Database::deleteAll() refuses to run without conditions, so it can never empty a table.
Functional bug fixes
- Changing an item's content type (for example to Video) no longer deletes its uploaded media file. Deleting an item now removes its media file for every content type.
- Content can no longer pick up another item's image.
- A collection can no longer be set as its own parent, or as a child of one of its own descendants.
- Block edits are now saved atomically.
- The default admin theme preference now takes effect.
- The online/offline toggle on the admin search page works again (it was missing its token).
- Tag RSS feeds work no matter how many items carry the tag, and they show the tag's own title and description.
- Cached RSS feeds keep their application/rss+xml content type.
- Search terms are no longer decoded twice. For example, %41 used to be searched as A.
- Fixed a bug where the escaped and unescaped copies of the search terms could get out of step.
- Invalid dates are rejected with an error instead of failing later.
- Teasers in the spotlight-compact block now display correctly.
- HTML in block edit forms is now escaped correctly.
- Media support: .gz and .kmz files now work, and .jpeg is accepted. .kml is no longer supported.
- The installer sets the default tag's fileSize to 0, which fixes a type error.
- paste_as_text in TinyMCE now works (the option name had a typo).
Reliability
- Forms larger than post_max_size used to fail silently. The server now returns a 413 page explaining the problem, and the content form checks the size before submitting.
- Streaming very large files no longer crashes.
- Thumbnails over 10 megapixels are refused, which prevents out-of-memory failures on very narrow source images.
- libvips thumbnails no longer use rename() (often disabled on servers), and each libvips command now has a time limit.
- Zero-size and corrupt images are caught before resizing.
- JPEG thumbnails are converted to sRGB using a bundled CC0 colour profile.
- Unnecessary exceptions and log entries were removed, and the maximum log size was reduced.
UX improvements
- The jQuery bootstrap-fileinput plugin was replaced with a native drag-and-drop uploader. It shows the current file and the file you've selected, lets you mark a file for removal and undo it, shows the maximum upload size, and warns you straight away about file types that aren't permitted or files that are too large.
- Files dropped outside the drop zone no longer navigate away and lose the form.
- The login form puts the cursor in the email field.
- New full-image-width collection gallery templates, plus some gallery styles and templates that were missing.
- Typography tweaks: lighter heading weights and adjusted font weights. Fixed the footer copyright notice.
- Inline figure/figcaption is disabled in the editor, because HTMLPurifier strips those tags anyway.
Library updates
- TinyMCE 8.0.1 → 8.10.2
- jQuery 3.7.1 → 4.1.0
- htmx 2.0.6 → 4.0.2
- Bootstrap 5.3.7 → 5.3.9
- PHPMailer → 7.2.0
- bootstrap-fileinput: removed
Upgrade notes
- jQuery 4 and htmx 4 are major upgrades. Check any custom themes or scripts that use them.
- Nginx and other non-Apache servers: uploads/image/.htaccess and trust_path/.htaccess only work on Apache. Add equivalent deny rules to your server config.
- Custom themes that link directly to uploads/image/ will stop working. Use the cached image URLs or manually uploaded images outside of the /uploads directory instead.
- The local database path now lives in an untracked trust_path/configuration/config.local.php, and config.php remains part of the distribution.
- .kml media files are no longer accepted.
Copyright, all rights reserved.