Commit Graph
5566 Commits
Author SHA1 Message Date
Dan Brown f8c2ada021 Lexical: Fixed difference in line break in-editor & on export
Aligned the linebreak exportdom behaviour to align with how the
reconciler displays line breaks in the editor, by adding an extra line
break to each series of line breaks, so they're now visually the same
across editor and export.
2026-09-06 19:19:44 +01:00
Dan Brown df40d8c08a Lexical: Made callout formatting in lists more reliable
Updates the callout toggle action to consider callouts in lists (and
other callouts) when making changes.
2026-09-05 18:52:49 +01:00
Dan Brown 9b56295dfd Lexical: Fixed formatting on reverse selection ranges in lists
Block formatting on range selection could break when made from bottom to
top, due to using the first selected for insertion position instead of
the first in the doc structure.
2026-09-05 18:15:57 +01:00
Dan Brown e573d2458b Lexical: Added enter/shift+enter handling for images in list items
Added testing to cover
2026-09-04 15:16:01 +01:00
Dan Brown 74e271c639 Lexical: Added missing code block direction handling
Adds some base text direction handling to decorator nodes which can be
used by nodes where it makes sense, like for the code block node.
2026-09-03 19:18:07 +01:00
Dan Brown 4d5e9fc8c4 Lexical: Fixed re-focus after modal in some cases
Updated code editor display so the editor area actually gains focus
again.
Updated modal handling to delegate focus handling to the editor if focus
was on the edit area before, to prevent cursor jumps to the start.
2026-09-03 18:53:08 +01:00
Dan Brown 13a1883b6c Page Filtering: Fixed table cell alignment being stripped
Cells could have an 'align' attribute, especially when created via
markdown. This updates the allow filtering to retain valid align values
on table cells.

For #6167
2026-09-03 13:19:07 +01:00
Dan Brown 18f8469a1c LDAP: Fixed handling of invalid group values
Updated LDAP group handling to properly handle empty group values by
checking the explode's count property instead of performing a general
array count.
Also updated logic with DN validation/filtering before LDAP calls are
made.

For #6088
2026-08-31 11:58:33 +01:00
Dan Brown 7539933d48 User Account: Require existing password on password change
For #6181
Just in users' my account area for now.
To add to admin-level actions in the future once we can better trace
session life.
Updated/added tests to cover.
2026-08-28 11:43:07 +01:00
Dan Brown 4a871811e9 API: Added changelog support to page create/update API
Also changed the UI based forms to submit as changelog instead of
summary to align with more sensible name used on the API.
Added testing to cover.

For #6162
2026-08-28 10:48:04 +01:00
Dan Brown f1fe98d194 Pages API: Added extra test to cover type mismatch scenario
Related to #6136
2026-08-28 10:25:39 +01:00
Dan Brown c70b299194 Merge pull request 'API Docs: Added new endpoints to download docs as html/json' (#6198) from api_docs_download into development
Reviewed-on: https://codeberg.org/bookstack/bookstack/pulls/6198
2026-08-27 00:03:57 +02:00
Dan Brown 8603266f77 API Docs: Covered download endpoints with tests 2026-08-26 22:30:07 +01:00
Dan Brown 35b6f57912 API Docs: Added new endpoints to download docs as html/json
Had to rename underlying controller method to prevent name clashing.
2026-08-26 15:20:36 +01:00
Dan Brown fac26126d5 PHPStan: Fixed found issues after merge 2026-08-26 10:30:57 +01:00
Dan Brown b4894ee23e Merge pull request 'Maintenance: PHPStan Level 5' (#6143) from phpstan_june26 into development
Reviewed-on: https://codeberg.org/bookstack/bookstack/pulls/6143
2026-08-25 14:11:51 +02:00
Dan Brown ff21f6b97c Merge pull request 'Configurable block layouts' (#6179) from sidebar_management into development
Reviewed-on: https://codeberg.org/bookstack/bookstack/pulls/6179
2026-08-25 14:11:14 +02:00
Dan Brown a5261f100d Merge pull request 'Added page scroll based progress indicator' (#6176) from progress_indicator into development
Reviewed-on: https://codeberg.org/bookstack/bookstack/pulls/6176
2026-08-25 14:09:10 +02:00
Dan Brown 2d6e60a9b3 Merge branch 'sec_aug26' into development 2026-08-24 13:25:55 +01:00
Dan Brown df5f7749fc Deps: Updated php packages, updated translators and licenses
Pre v26.05.4 release
2026-08-24 11:44:08 +01:00
Crowdin Bot 316f52f894 New Crowdin translations by GitHub Action 2026-08-24 04:30:57 +00:00
Dan Brown e5a2832970 Page filtering: Fixed allow list stripping sftp and fragment links
Actually registered the SFTP protocol with HTMLPurifier to allow SFTP
links.
Replaced the default MakeAbsolute URI filter for HTMLPurifier so that
fragment based links are allowed, and are not forced to have a base URL
and/or protocol.

For #6178, Related to #6186
2026-08-24 00:03:06 +01:00
Dan Brown 0365dcc0b1 Page Drafts: Applied draft owner check to more endpoints
As a follow-up to e3068369a2, this applies
the draft ownership check to various other draft endpoints.

Thanks again to SVO for reporting.
2026-08-23 18:08:46 +01:00
Dan Brown 82a8cc35cf Recycle Bin: Ensure permissions are updated for deleted items
Fixed lack of permission update scope in permission builder where
trashed pages on chapter permission updates would not get permission
updates.

Also added permission rebuild on restore as an extra assurance.
Added tests to cover.

Thanks to SVO — svo.com.br for reporting.
2026-08-23 14:24:34 +01:00
Dan Brown 8f8a6ebf6a Content filtering: Fixed sftp protocols being removed
For #6186
2026-08-22 22:55:08 +01:00
Dan Brown e210cc32e4 ZIP Imports: Prevented non-image creation via book cover
- Updates ZIP imports to validate that actual mime type of book cover
  images to ensure they are a supported image file.
- Updates lower level ImageStorage to validate extensions of images when
  cleaning their name pre-storage.
- Updates ZIP import Image and Book handling so book cover and image
  files have their extension forced from file mime types in the same
  way.

Added testing to cover.

Thanks to the submersion.ai security research team for reporting.
2026-08-22 18:46:31 +01:00
Dan Brown b1991143b0 Search: Added draft filtering to generic entity list query
The lack of the filter could result in draft pages, from other users,
showing in locations like search results.

Thanks to Ahmed Ibrahim (github.com/skeletonsec) for reporting.
2026-08-21 12:07:25 +01:00
Dan Brown e3068369a2 Pages: Prevent update of non-draft pages via draft publish
To prevent the ability to use the draft publish endpoint on non-draft
pages which the user may not have the ability to update by default.

Thanks to SVO for reporting.
2026-08-20 09:55:50 +01:00
Dan Brown ac0348a79f Images: Added content checking and app range support to streaming
Mainly to prevent non-image files being streamed in scenarios where the
underlying image data is somehow a non-image.

Thanks to Emanuele Cervelli (https://github.com/M4nu02) for reporting.
2026-08-19 17:52:35 +01:00
Dan Brown fbe83a1895 Drawings: Validated drawing upload content as image data
Specifically check the mime type of Base64 drawing data to ensure
that it reads as image data rather than anything else which could be
potentially dangerous.

Thanks to Emanuele Cervelli (https://github.com/M4nu02) for reporting.
2026-08-19 16:53:47 +01:00
Dan Brown a889c18c02 Attachment API: Fixed missing check on attachment page change
On the change of an attachment uploaded_to (page) this ensures that a
PageUpdate permission check is made against the original attachment
page, in addition to the new page.

Thanks to Wade Sparks / ByteMe.Red for reporting.
2026-08-19 12:17:58 +01:00
Dan Brown 63082b53cc Layouts: Review and testing/CI update 2026-08-17 19:53:58 +01:00
Dan Brown db50b14000 Layouts: Added logical theme event and guidance for block registration 2026-08-17 18:27:47 +01:00
Dan Brown 2c300d8f15 Layouts: Checked text, mobile view and dark mode use 2026-08-17 11:52:22 +01:00
Dan Brown 8760481fc2 Layouts: Added testing for access control, and view impact
Added a new middlware to properly handle per-request in-memory caching
within the app.
2026-08-16 23:03:40 +01:00
Dan Brown e16a4b2aaf Layouts: Moved editor controls into dropdown
Also added user advice on two-column layouts about how they stack on
mobile.
Changed how fixed dropdowns work, so they instead remain in place to
their events and dom handling does not need special handling.
Updated keyboard navigation so ignore elements which are hidden via CSS.
2026-08-16 18:36:38 +01:00
Dan Brown 404e048588 Layouts: Added reset to default action, made views dynamic
Shows only one homepage option depending on app homepage setting.
Only shows center column in editor for supported locations.
2026-08-16 14:12:30 +01:00
Dan Brown 01b29515c8 Layouts: Updated view block ids/labels to be static
So that their metadata can be read without having to create instances
and fullfill dependancy injection just to list.

Also added title to interface prefs page.
2026-08-16 10:41:43 +01:00
Dan Brown b1c1cd134c Layouts: Added user preference load logic 2026-08-15 23:05:32 +01:00
Dan Brown f98492e725 Layouts: Added update logic and testing 2026-08-15 20:43:56 +01:00
Dan Brown 9dfa885745 Layout Editor: Added front-end logic 2026-08-15 16:50:12 +01:00
Dan Brown 10cf128598 Layouts: Started edit form ui, added block IDs 2026-08-12 15:43:00 +01:00
Dan Brown 78610a2a14 Layouts: Started building views/actions for layout configuration 2026-08-11 16:43:56 +01:00
Dan Brown c79997e552 User Prefs: Added handling for lang and display mode
Included test to cover.
2026-08-11 14:32:18 +01:00
Dan Brown 3205e73bb9 User Prefs: Added new interface preferences section 2026-08-10 19:18:05 +01:00
Dan Brown 45ff36714f View Blocks: Extracted default set, added labels to each 2026-08-09 18:35:10 +01:00
Dan Brown 600497b110 Views: Extracted home view sections into blocks
Also removed unused request from block interface.
2026-08-09 15:12:07 +01:00
Dan Brown e3ebcb2250 Views: Extracted homepage sections into their own views 2026-08-09 11:54:42 +01:00
Dan Brown d4d90cc39c Views: Renamed SidebarSections to ViewBlocks 2026-08-07 16:00:04 +01:00
Dan Brown b462c67e2f Views: Extracted sidebar blocks for main entity pages 2026-08-07 12:54:38 +01:00