1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2026-10-27 18:52:58 +03:00

6009 Commits

Author SHA1 Message Date
Dan Brown
cec78b1bcf Updated version and assets for release v26.05.4 v26.05.4 2026-08-24 13:42:49 +01:00
Dan Brown
50f78ea38a Merge branch 'development' into release 2026-08-24 13:41:27 +01: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
c813c1b362 Meta: Updated translator list 2026-07-30 02:42:46 +01:00
Dan Brown
e1cd322996 Updated version and assets for release v26.05.3 v26.05.3 2026-07-29 10:20:30 +01:00
Dan Brown
6687bf0697 Merge branch 'development' into release 2026-07-29 10:19:29 +01:00
Dan Brown
de6e6f3dd9 Deps: Updated PHP package versions 2026-07-29 09:56:08 +01:00
Dan Brown
1a1d724892 Merge branch 'sec_jul26' into development 2026-07-29 09:49:41 +01:00
Dan Brown
652ce53720 Merge pull request 'New Crowdin translations by GitHub Action' (#6175) from l10n_development into development
Reviewed-on: https://codeberg.org/bookstack/bookstack/pulls/6175
2026-07-29 10:48:44 +02:00
Crowdin Bot
17398590d3 New Crowdin translations by GitHub Action 2026-07-29 04:31:29 +00:00
Dan Brown
a0108ae0ea Maintenance: Fixed test issues from recent changes 2026-07-28 15:19:20 +01:00
Dan Brown
badc4f9b8e Gallery API: Aligned image querying
Updated endpoint image querying to generally follow the same logic to
ensure filtering on just the expected types which are intended to be
managed by this endpoint, and it err on the side of caution in terms of
access control.
2026-07-28 14:29:36 +01:00
Dan Brown
5ed685d1e6 Image API: Update delete permission check
Aligns with ImageController permissions by checking related item view
access only if that still exists.

Thanks to Tanner Marks for reporting.
2026-07-28 13:35:42 +01:00
Dan Brown
2183fc7fc8 API: Limited exception details shown
Updated exception handler to reduce the amount of detail shown to
prevent potentially sensitive details (like internal paths) being shown
in the error message.

Added an interface for specifically marking exceptions whos messages we
may want to show.

Thanks to Tanner Marks for reporting.
2026-07-28 13:27:42 +01:00
Dan Brown
1732f15e4c External Auth: Updated user external auth id matching to be stricter
Added tests to cover.
Thanks to whale120 for reporting.
2026-07-27 21:23:47 +01:00
Dan Brown
cb195999eb Content Filter: Updated srcset and URI handling
- Added more complex srcset parsing and URI handling via custom built
  HTMLPurifier filter, which I've also provided upstream.
- Added a custom URI filter to force require URI schemes.
2026-07-27 12:12:07 +01:00
Dan Brown
0ada5d2dc9 Login: Added extra timing defenses for failed login attempts
- Adds a dummy hash attempt to balance the time of unknown user login
  attempt with known user login attempt to help prevent timing being
  used to indicate existing accounts.
- Adds some random variance to failed login attempts to help prevent
  timing based information discovery.

Thanks to Tanner Marks for their responsible disclosure of this.
2026-07-24 14:38:54 +01:00
Dan Brown
4e406c41c4 Attachments: Aligned update form permission checks with other actions
Thanks to Ashutosh Jena(MAVERICK-VF142) for reporting.
Not considered a significant security issue since it already required
page update permissions, which would generally be considered higher
privileged than the added page view.
2026-07-23 20:57:48 +01:00
Dan Brown
fcb2d40606 Updated version and assets for release v26.05.2 v26.05.2 2026-07-02 10:39:46 +01:00
Dan Brown
718876461c Merge branch 'development' into release 2026-07-02 10:38:49 +01:00
Dan Brown
6107161275 URLs: Fixed issue in comparisons when elements missing 2026-07-02 10:21:01 +01:00
Dan Brown
ad283ef0ed Updated packages, translators and licensing pre v26.05.2 2026-07-02 09:41:17 +01:00
Dan Brown
b87789dde6 Merge branch 'sec_jun26' into development 2026-07-02 09:38:17 +01:00
Dan Brown
a213175004 Merge pull request 'Updated translations with latest crowdin changes' (#6166) from l10n_development into development
Reviewed-on: https://codeberg.org/bookstack/bookstack/pulls/6166
2026-07-02 10:36:35 +02:00
Crowdin Bot
b6e3d304fe New Crowdin translations by GitHub Action 2026-07-02 08:34:05 +00:00
Dan Brown
6bba39196c Merge pull request 'Added Serbian language to language_select array' (#6153) from PolarniMeda/bookstack:development into development
Reviewed-on: https://codeberg.org/bookstack/bookstack/pulls/6153
2026-07-02 10:32:48 +02:00
Dan Brown
caeea658d1 Access: Hardened usage of referring URLs via login
Adds a more substantial URL check, via a new class which is shared and
used in other parts of the app for consistency.

Thanks to mfk25 for reporting.
2026-07-01 10:45:59 +01:00
Dan Brown
fe39b69c1f Comments: Added visibility check to comment delete
Aligns it with other actions/endpoints, and ensures an extra layer of
control against malicious use.

Thanks to mfk25 for reporting.
2026-07-01 10:20:32 +01:00
Dan Brown
01dc1e71c5 Attachments: Added more extensive URL filtering
Added a central URLFilter class to check & clean URLs used for
attachments, which is also used for validation, and by the purifier to
standardise protocols (and to make protocol config easier in future).

Thanks to mfk25 for reporting.
2026-07-01 00:41:19 +01:00
Dan Brown
59bbf504cf Content filtering: Added srcset protocol filter
Upstream libraries used did not specifically treat values in srcset as
URIs like other attributes, so this adds a simple filter for possible
bad values.
Updated tests to cover.

Thanks for Gurmandeep Deol for reporting.
2026-06-30 18:35:34 +01:00
Dan Brown
f7df78b91b CI: Attempted to fix snyk workflow 2026-06-24 13:58:20 +01:00
Dan Brown
c511f7d935 CI: Added workflow to sync with snyk 2026-06-24 13:48:20 +01:00
Dan Brown
79a2e017bb Maintenance: Fixed type and CI issues
- Fixed issues picked up by PHPStan updates.
  - Not sure why it was flagging the BookSorter issue, but swapping if
    statements made it go away.
- Updated BookSortMapItem with modern syntax.
- Attempted to fix CI issues by adding DOM extension.
- Attempted to make migration CI more efficient via tmpfs
2026-06-11 14:24:09 +01:00
PolarniMeda
dad83d473d Added Serbian language to language_select array 2026-06-11 10:32:03 +02:00
Dan Brown
f63a592fbe Updated version and assets for release v26.05.1 v26.05.1 2026-06-09 13:01:11 +01:00
Dan Brown
ddf8f502e8 Merge branch 'development' into release 2026-06-09 13:00:16 +01:00
Dan Brown
c74df7e06b Updated translator & dependency attribution before release v26.05.1 2026-06-09 12:50:16 +01:00
Dan Brown
6b545d600c Merge branch 'v26051_sec' into development 2026-06-09 12:48:39 +01:00