2 categories = ["Releases"]
4 title = "BookStack Release v21.10"
5 date = 2021-10-25T14:20:00Z
7 image = "/images/blog-cover-images/gate-benofthenorth.jpg"
8 slug = "bookstack-release-v21-10"
12 October brings us BookStack v21.10. This release is primarily intended to wrap up a few
13 loose ends before we make more substantial framework changes, but it does bring with
14 it a new authentication option in addition to some new API endpoints.
15 In the below we'll dive into many of the new features and improvements added
16 [since v21.08](/blog/bookstack-release-v21-08/).
18 * [Update instructions](https://www.bookstackapp.com/docs/admin/updates)
19 * [GitHub release page](https://github.com/BookStackApp/BookStack/releases/tag/v21.10)
24 - **Security Releases** - There were some security vulnerabilities found during the life of
25 v21.08. See the [v21.08.2](/blog/bookstack-release-v21-08-2/) and
26 [v21.08.5](/blog/bookstack-release-v21-08-5/) posts for more details.
27 - **Content Security Policy** - v21.08.2 introduced the use of BookStack-applied CSP headers. These
28 could potentially conflict with any CSP headers set a server-level. The use of these are detailed
29 in the post below and details of the headers can be found on the [security page here](/docs/admin/security/#content-security-policy-csp).
31 ### OpenID Connect Authentication
33 v21.10 brings with it the option of using OpenID Connect (OIDC) as a primary authentication method
35 This allows authentication integration with a wide range of providers that support the OIDC standard.
36 The implementation includes basic auto-discovery of endpoints & keys for easier configuration.
37 During development it has been tested with Okta, KeyCloak and Auth0.
39 
41 For this initial implementation we don't yet support group sync but I've opened up a
42 [GitHub issue here](https://github.com/BookStackApp/BookStack/issues/3004) to gain feedback on how
43 identity providers supply groups. Please contribute feedback on that issue if you desire OIDC group support.
45 You can find documentation on [using OpenID Connect here](/docs/admin/oidc-auth/).
49 #### Attachment Endpoints
51 A new set of API endpoints have been introduced to support the management of attachments.
52 Full CRUD & listing operations are supported for both file-upload and external-link style
55 
57 #### Image Upload via Markdown Content
59 Since v21.05.1 it has been possible to upload images as part of an API page update or create operation,
60 via embedding the image as a data-uri within HTML content. This release builds upon that to bring
61 the same functionality to markdown content on the same API endpoints; For example:
64 
67 ### TOTP URL During MFA Setup
69 Since the TOTP MFA system was added to BookStack in the last feature release, it was reported
70 that some TOTP-handling services require a URL, or secret code, instead of a QR code. To support
71 this, as of v21.08.1, we now show the TOTP URL below the QR code, which the secret can be copied out from
74 
76 ### IP Address in Audit Log
78 Within BookStack v21.08.4 the audit log was updated to now record and show the related user IP address
79 for activities. Note, if you're using a reverse proxy in front of BookStack you may need to configure
80 the `APP_PROXIES` .env option [as shown here](https://github.com/BookStackApp/BookStack/blob/9c2b8057ab7b744c0824a9a3e48c3ccd36b8c103/.env.example.complete#L45-L51) otherwise the reported IP
81 address may be that of the proxying system instead of the user.
83 
85 Thanks to [@johnroyer](https://github.com/BookStackApp/BookStack/pull/2936) for the addition of this feature.
87 ### Smarter Concurrent Editing Detection & Warnings
89 Thanks to [@MatthieuParis](https://github.com/BookStackApp/BookStack/pull/2877), BookStack will now run
90 additional potential editor conflict detection upon draft saves whereas previously this would only run upon the
91 start of an editing session. This should prove especially useful when someone has the editor open for
92 a while, since there's now a much greater chance of being alerted if someone else starts editing the
93 same page. This enhancement was added as part of v21.08.5.
95 
99 In v21.08.6 a new BookStack specific debug view was introduced.
100 This was introduced to limit the accidental sharing of errors and confidential details, while
101 providing important details & potentially helpful BookStack specific resources to the admin
102 attempting to debug the problem at hand.
104 
109 Another feature release, another language added to BookStack. A massive thanks to Indrek Haav for
110 adding Estonian to BookStack!
112 As usual, there's been a bunch of translation updates via CrowdIn since the last feature release.
113 Thanks a bunch to all those listed below for their great continued work!
115 - Indrek Haav (IndrekHaav) - *Estonian*
116 - na3shkw - *Japanese*
117 - Nicolas Pawlak (Mikolajek) - *French; Polish; German*
118 - Michał Lipok (mLipok) - *Polish*
120 - Leonardo Mario Martinez (leonardo.m.martinez) - *Spanish, Argentina*
121 - FastHogi - *German; German Informal*
122 - Statium - *Russian*
123 - Giancarlo Di Massa (digitall-it) - *Italian*
124 - Thomas Hansen (thomasdk81) - *Danish*
125 - Ngo Tri Hoai (trihoai) - *Vietnamese*
126 - Luís Tiago Favas (starkyller) - *Portuguese*
127 - Francesco Franchina (ffranchina) - *Italian*
128 - Radim Pesek (ramess18) - *Czech*
129 - aarchijs - *Latvian*
130 - 10935336 - *Chinese Simplified*
132 - nutsflag - *French*
133 - anastasiia.motylko - *Ukrainian*
134 - M Nafis Al Mukhdi (mnafisalmukhdi1) - *Indonesian*
135 - 慕容潭谈 (591442386) - *Chinese Simplified*
137 ### Introduction of Content Security Policy
139 Within v21.08.2 [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)
140 headers were added to the responses served by BookStack.
141 This massively helps reduce the impact of a wide range of potential XSS vulnerabilities by restricting
142 the types of scripts that can run within the content of a page.
144 Content within the "Custom HTML Head Content" is automatically parsed to be correctly tagged so it adheres
145 to the fairly strict policy set. Any custom script additions you've made may need adjustment.
147 Details of headers set can be found in the [CSP section of our security page](/docs/admin/security/#csp).
149 ### SAML 2 Enhancements
151 The SAML 2.0 authentication system has received some attention in this release.
152 It has been found that logging in via
153 SAML could lose the original intended location context of a user, leading to them being redirect to the
154 homepage after login instead of the page they actually wanted to visit. This was due to a change in cookies
155 causing the user's session to be lost during the SAML flow. This release tweaks the flow so the session
156 is kept for correct expected redirection.
158 Upon the above, A couple of new `.env` options have been introduced to allow the configuring of service
159 provider certificate and key:
162 # Service Provider Certificate & Key (Optional)
163 # Providing these will provide key data within BookStack's metadata endpoint
164 # while implicitly enabling signing on Authn and Logout requests.
165 SAML2_SP_x509=<cert_data>
166 SAML2_SP_x509_KEY=<key_data>
169 These options were primarily added to help fix single-logout-service requests when using
170 ADFS.Thanks to [@theodor-franke](https://github.com/BookStackApp/BookStack/pull/2902) for helping by doing the initial work to implement these changes.
173 ### Full List of Changes
175 **Released in v21.10**
177 * Added OpenID Connect authentication option. Thanks to [@jasperweyne](https://github.com/BookStackApp/BookStack/pull/2169). ([#2960](https://github.com/BookStackApp/BookStack/pull/2960), [#2169](https://github.com/BookStackApp/BookStack/pull/2169), [#1390](https://github.com/BookStackApp/BookStack/issues/1390), [#1157](https://github.com/BookStackApp/BookStack/issues/1157))
178 * Added Attachment API endpoints. ([#2986](https://github.com/BookStackApp/BookStack/pull/2986), [#2942](https://github.com/BookStackApp/BookStack/issues/2942))
179 * Added Estonian language to BookStack via Crowdin. ([#2979](https://github.com/BookStackApp/BookStack/issues/2979))
180 * Added support for SAML2 SLS signing to help address issues with ADFS. Thanks to [@theodor-franke](https://github.com/BookStackApp/BookStack/pull/2902). ([#2902](https://github.com/BookStackApp/BookStack/pull/2902))
181 * Added support for base64 image content within markdown text via page POST/PUT. ([#2898](https://github.com/BookStackApp/BookStack/issues/2898))
182 * Updated translations from Crowdin contributors. ([#2983](https://github.com/BookStackApp/BookStack/pull/2983))
183 * Updated SAML ACS post flow to retain user session and therefore redirect to the correct location upon login. ([#2996](https://github.com/BookStackApp/BookStack/pull/2996), [#2552](https://github.com/BookStackApp/BookStack/issues/2552))
184 * Fixed padding within book-tree sidebar items. Thanks to [@ffranchina](https://github.com/BookStackApp/BookStack/pull/3000). ([#3000](https://github.com/BookStackApp/BookStack/pull/3000))
186 **Released in v21.08.1 through v21.08.6**
188 * Added custom whoops-based debug view which fixes issue where debug view would not show content due to CSP rules. ([#2977](https://github.com/BookStackApp/BookStack/pull/2977), [#2976](https://github.com/BookStackApp/BookStack/issues/2976))
189 * Added throttling to password reset requests. ([ca764ca](https://github.com/BookStackApp/BookStack/commit/ca764caf2d55a5c9bac61718d656423b0c3a060b))
190 * Added IP address to tracked activities and displayed in audit log. Thanks to [@johnroyer](https://github.com/BookStackApp/BookStack/pull/2936). ([#2936](https://github.com/BookStackApp/BookStack/pull/2936), [#2747](https://github.com/BookStackApp/BookStack/issues/2747))
191 * Added the option to use database table prefixes. Thanks to [@floviolleau](https://github.com/BookStackApp/BookStack/pull/2935). ([#2935](https://github.com/BookStackApp/BookStack/pull/2935))
192 * Added concurrent page editing warnings upon draft save events. Thanks to [@MatthieuParis](https://github.com/BookStackApp/BookStack/pull/2877) ([#2877](https://github.com/BookStackApp/BookStack/pull/2877))
193 * Allowed the use of content includes when using a custom homepage.
194 * Updated DOMPDF chroot directory to prevent potential unintended file access. ([#2965](https://github.com/BookStackApp/BookStack/pull/2965))
195 * Updated TOTP setup flow to display a URL of the QR code contents during setup for non-QR scanning usage. ([#2908](https://github.com/BookStackApp/BookStack/issues/2908))
196 * Updated translations with latest content from Crowdin. ([#2926](https://github.com/BookStackApp/BookStack/pull/2926), [#2915](https://github.com/BookStackApp/BookStack/pull/2915), [#2906](https://github.com/BookStackApp/BookStack/pull/2906), [#2980](https://github.com/BookStackApp/BookStack/pull/2980), [#2953](https://github.com/BookStackApp/BookStack/pull/2953))
197 * Fixed broken page ordering on various views. ([#2905](https://github.com/BookStackApp/BookStack/issues/2905))
198 * Fixed vulnerability where a malicious user with page edit access could enter script that would execute upon page view.
199 * Fixed certain "Custom HTML Head Content" being incorrectly altered or converted. ([#2923](https://github.com/BookStackApp/BookStack/issues/2923), [#2914](https://github.com/BookStackApp/BookStack/issues/2914))
200 * Converted old test cases to remove reliance on BrowserKit. ([#2928](https://github.com/BookStackApp/BookStack/pull/2928))
201 * Fixed incorrect audit log detail on social account sign-in. ([#2930](https://github.com/BookStackApp/BookStack/issues/2930))
202 * Fixed issue where QR codes were not readable when using dark mode. ([#2925](https://github.com/BookStackApp/BookStack/issues/2925))
203 * Fixed issue where TOTP setup would provide guest email address upon QR code scan when MFA setup was enforced at login. ([#2971](https://github.com/BookStackApp/BookStack/issues/2971))
208 This release marks the first feature release since [I left my job](https://danb.me/blog/posts/leaving-my-job-to-focus-on-open-source/) to focus on BookStack and other bits
209 for a while. My main focus of v21.10 was to work through some of the challenging
210 & time consuming authentication elements that have been on the backlog for a while.
211 Having the extra time to dedicate to these has been helpful to perform the discovery and learning
212 required without frustratingly consuming many-a-weekend.
214 Now I've reduced some of the PR backlog, initial focus going into this week will be on
215 upgrading the codebase framework from Laravel 6 to Laravel 8 (As mentioned the "Next Steps"
216 of the last two feature release posts). Once this upgrade is done I'll look to test things out
217 via making improvements to existing systems. Both the search system and tagging capabilities are
218 in need of some attention and hence is where I may spend some time.
222 <span style="font-size: 0.8em;opacity:0.9;">Header Image Credits: <span>Photo by <a href="https://unsplash.com/@benofthenorth?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Ben Griffiths</a> on <a href="https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a></span></span>