]> BookStack Code Mirror - website/blob - content/blog/bookstack-release-v21-08.md
Update filesystem-permissions.md
[website] / content / blog / bookstack-release-v21-08.md
1 +++
2 categories = ["Releases"]
3 tags = ["Releases"]
4 title = "BookStack Release v21.08"
5 date = 2021-08-31T21:01:23Z
6 author = "Dan Brown"
7 image = "/images/blog-cover-images/lighthouse-dimitry_b.jpg"
8 slug = "bookstack-release-v21-08"
9 draft = false
10 +++
11
12 Today we release BookStack v21.08, which brings along multi-factor authentication support in addition to a
13 number of other nice features. Within this post we'll dive into some of the biggest new changes since the v21.05 release.
14
15 * [Update instructions](https://www.bookstackapp.com/docs/admin/updates)
16 * [GitHub release page](https://github.com/BookStackApp/BookStack/releases/tag/v21.08)
17
18
19 **Upgrade Notices**
20
21 - **Config & Administration** - The introduction of multi-factor authentication brings the first use of encryption in the platform.
22   This uses the `APP_KEY` value in your `.env` file. Ensure you have this stored safely since it would be required if you ever
23   restore/migrate your instance to another system.
24 - **Security/Exports** - During this release cycle it was highlighted that server-side request forgery could be achieved via the 
25   PDF export system. External fetching in the default PDF renderer has been disabled by default. The WKHTMLtoPDF renderer will now 
26   not be used if active. Either of these changes can be overridden by setting `ALLOW_UNTRUSTED_SERVER_FETCHING=true` in your `.env` file.
27   This should only be used were only trusted users can create and export content. To support this we've added permissions that allow disabling of exports per role.
28 - **Security/Authentication** - A slight change was made in relation to how email addresses are confirmed. Email confirmations are now primarily checked at point-of-login rather
29   than being checked on every request. Enabling email confirmation, or email domain restrictions, may no longer take action on unconfirmed users right away in the future.
30
31
32 ### Multi-Factor Authentication
33
34 Multi-factor authentication (MFA) can now be enabled for user accounts in BookStack.
35 Two different MFA methods are available in this initial release of the feature:
36
37 1. TOTP, Labelled as "Mobile App" (Google/Microsoft Authenticator etc...)
38 2. Backup Codes (A list of single-use codes)
39
40 MFA can be enabled by any user accounts in the system. It can be enforced at a per-role level
41 via a new "Requires Multi-Factor Authentication" checkbox found when editing a role:
42
43 ![View of MFA required checkbox on role edit page](/images/2021/08/mfa-role-permission.png)
44
45 When required, users will be forced to setup at least one MFA method upon next login.
46 For those with at least one method configured, the system will require an MFA method to be used
47 upon login:
48
49 ![MFA Verificiation View](/images/2021/08/mfa-verify-view.png)
50
51 To help in the scenario where someone may lose their MFA credentials, a new system command
52 has been added which will clear all MFA methods for the given user:
53
54 ```bash
55 php artisan bookstack:reset-mfa [email protected]
56 ```
57
58 This feature was more effort than expected, partially due to needing to refactor how
59 authentication is performed within BookStack, but it should provide a significant 
60 benefit to instances that house sensitive content.
61
62 ### Markdown Export
63
64 In addition to the PDF, plaintext and HTML export options, you can now export pages,
65 chapters and books as markdown:
66
67 ![List of page export options including markdown](/images/2021/08/export-options-with-markdown.png)
68
69 For pages that have not been written in the markdown editor, we'll attempt to convert
70 the underlying HTML content to markdown. 
71 This new markdown export option has also been added to the API. Note: This format does
72 not contain the image data like the HTML option since readability and cleanliness have taken
73 priority.
74
75 ### Role-Based Export Permissions
76
77 A new "Export content" role permission has been added to BookStack. This will be given to
78 all roles by default upon upgrade. This new permission allows admins to control who can 
79 see and use the "Export" option that's available via the API or on any page, chapter or book.
80
81 ### "Skip to content" Link
82
83 A new accessibility feature was added in v21.05.3, providing a "Skip to main content" link on the
84 first element of focus on the page. This link is not visible by default but will appear when focused
85 upon, typically by hitting tab after landing on a page.
86
87 ![View of the Skip to content link](/images/2021/08/skip-to-content-link.png)
88
89 ### Upload Images in Page Content via API
90
91 As of v21.05.1 it's now possible to upload images via a page's HTML content.
92 To utilise this, the image just needs to be provided as a base64 encoded data URI within the
93 src of an img tag like so:
94
95 ```json
96 {
97         "html": "<p><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQAB'></p>"
98 }
99 ```
100
101 Upon POST/PUT of this data, BookStack will extract these images out to their own files, as if they had 
102 been uploaded via the UI. This is not yet available for markdown content.
103
104 ### Non-Download Attachment Links
105
106 Within BookStack v21.05.2 we added the ability to open/reference attachments without
107 forcing the file to be downloaded. This can be useful for files that your browser may support
108 like images and PDFs, where they could then open in their own tab instead of being downloaded.
109
110 ![Preview of a non-download attachment link](/images/2021/08/non-download-attachment-link.png)
111
112 This feature is fairly hidden. You can either Ctrl/Cmd+Click the attachment link or add `?open=true` 
113 to the end of any current attachment link. I'd like to build this option into the interface at some
114 point to make it easier to find & use where desired.
115
116
117 ### Translations
118
119 This release brings a new language option of Lithuanian!
120 Big thanks to [@ffranchina](https://github.com/BookStackApp/BookStack/pull/2868) and their translators
121 for providing this new language.
122
123 Upon that, the below wonderful people have provided translation updates to the shown languages
124 since the initial v21.05 release:
125
126 - Behzad HosseinPoor (behzad.hp) - *Persian*
127 - Jakub Bouček (jakubboucek) - *Czech*
128 - syn7ax69 - *Bulgarian; Turkish*
129 - Ole Aldric (Swoy) - *Norwegian Bokmal*
130 - whenwesober - *Indonesian*
131 - m0uch0 - *Spanish*
132 - Alexander Predl (Harveyhase68) - *German*
133 - scureza - *Italian*
134 - Gustav Kånåhols (Kurbitz) - *Swedish*
135 - 10 935 336 - *Chinese Simplified*
136 - Michał Stelmach (stelmach-web) - *Polish*
137 - Francesco Franchina (ffranchina) - *Italian*
138 - arniom - *French*
139 - 林祖年 (contagion) - *Chinese Traditional*
140 - nutsflag - *French*
141 - Leonardo Mario Martinez (leonardo.m.martinez) - *Spanish, Argentina*
142 - Vuong Trung Hieu (fpooon) - *Vietnamese*
143 - Irfan Hukama Arsyad (IrfanArsyad) - *Indonesian*
144 - semirte - *Bosnian*
145 - Luís Tiago Favas (starkyller) - *Portuguese*
146 - Statium - *Russian*
147 - Gerwin de Keijzer (gdekeijzer) - *German; Dutch*
148 - aarchijs - *Latvian*
149 - Lis Maestrelo (lismtrl) - *Portuguese, Brazilian*
150 - Nathanaël (nathanaelhoun) - *French*
151 - A Ibnu Hibban (abd.ibnuhibban) - *Indonesian*
152 - Martins Pilsetnieks (pilsetnieks) - *Latvian*
153 - Frost-ZX - *Chinese Simplified*
154 - Kuzma Simonov (ovmach) - *Russian*
155 - Vojtěch Krystek (acantophis) - *Czech*
156 - Blaade - *French*
157 - Siamak Guodarzi (siamakgoudarzi88) - *Persian*
158
159
160 ### Full List of Changes
161
162 **Released in v21.08**
163
164 * Added multi-factor authentication system. ([#2827](https://github.com/BookStackApp/BookStack/pull/2827), [#1118](https://github.com/BookStackApp/BookStack/issues/1118))
165 * Added the ability to export content as Markdown. Thanks to [@nikhiljha](https://github.com/BookStackApp/BookStack/pull/2115). ([#2115](https://github.com/BookStackApp/BookStack/pull/2115), [#1717](https://github.com/BookStackApp/BookStack/issues/1717))
166 * Added role permissions for exporting content. ([#2899](https://github.com/BookStackApp/BookStack/pull/2899), [#1251](https://github.com/BookStackApp/BookStack/issues/1251))
167 * Added an advisory notice on the shelf permissions page regarding the lack of cascade. ([#2876](https://github.com/BookStackApp/BookStack/issues/2876))
168 * Added Lithuanian language translations. Thanks to [@ffranchina](https://github.com/BookStackApp/BookStack/pull/2868). ([#2868](https://github.com/BookStackApp/BookStack/pull/2868))
169 * Added item parent link in recycle bin restore to make parent item restore easier. Thanks to [@arjvand](https://github.com/BookStackApp/BookStack/pull/2682). ([#2682](https://github.com/BookStackApp/BookStack/pull/2682), [#2594](https://github.com/BookStackApp/BookStack/issues/2594))
170 * Added some core opengraph tags to content. Thanks to [@james-geiger](https://github.com/BookStackApp/BookStack/pull/2393). ([#2393](https://github.com/BookStackApp/BookStack/pull/2393), [#2348](https://github.com/BookStackApp/BookStack/issues/2348))
171 * Updated blade views to be more consistent and follow a documented convention. ([#2805](https://github.com/BookStackApp/BookStack/issues/2805))
172 * Fixed markdown blockquotes not rendering correctly in preview. ([#2858](https://github.com/BookStackApp/BookStack/issues/2858), [#2837](https://github.com/BookStackApp/BookStack/issues/2837))
173 * Fixed issue on API where page updates can remove HTML. ([#2856](https://github.com/BookStackApp/BookStack/issues/2856))
174 * Fixed inconsistency in list display and nesting. ([#2854](https://github.com/BookStackApp/BookStack/issues/2854))
175 * Standardised styling of the codebase. ([#2820](https://github.com/BookStackApp/BookStack/pull/2820))
176
177 **Released in v21.05.1 through v21.05.4**
178
179 * Added base64 image extraction within page content. Thanks to [@awarre](https://github.com/BookStackApp/BookStack/pull/2700). ([#2700](https://github.com/BookStackApp/BookStack/pull/2700), [#2631](https://github.com/BookStackApp/BookStack/issues/2631))
180 * Added Croatian translations. Thanks to [@ffranchina](https://github.com/BookStackApp/BookStack/pull/2784). ([#2784](https://github.com/BookStackApp/BookStack/pull/2784), [#2785](https://github.com/BookStackApp/BookStack/pull/2785))
181 * Added VB.NET code block highlighting option. ([#2869](https://github.com/BookStackApp/BookStack/issues/2869))
182 * Added a "Skip to content" link as first page focus item for accessibility use. ([#2810](https://github.com/BookStackApp/BookStack/issues/2810))
183 * Added the ability to serve attachments without forcing downloads. ([#2791](https://github.com/BookStackApp/BookStack/pull/2791))
184 * Updated item permission roles list to be sorted alphabetically. ([#2782](https://github.com/BookStackApp/BookStack/issues/2782))
185 * Updated social account detachment to have CSRF protection. ([#2808](https://github.com/BookStackApp/BookStack/issues/2808))
186 * Updated PHP dependency versions.
187 * Updated translations with latest changes from Crowdin. ([#2790](https://github.com/BookStackApp/BookStack/pull/2790))
188 * Merged in latest Crowdin translations. ([#2787](https://github.com/BookStackApp/BookStack/pull/2787), [#2777](https://github.com/BookStackApp/BookStack/pull/2777))
189 * Improved audit log user select list stability. ([#2863](https://github.com/BookStackApp/BookStack/issues/2863))
190 * Fixed incorrect styling of favourites sidebar when using a non-default homepage option. ([#2783](https://github.com/BookStackApp/BookStack/issues/2783))
191 * Fixed issue where empty HTML comments could cause errors. ([#2804](https://github.com/BookStackApp/BookStack/issues/2804))
192 * Extracted not found text into its own view for easier overridding ([58117bc](https://github.com/BookStackApp/BookStack/commit/58117bcf2d91b72620de3e34b0daa705da519f5e))
193 * Fixed issue where translations system may attempt to load from the root directory when a theme was not in use. ([#2836](https://github.com/BookStackApp/BookStack/issues/2836))
194 * Fixed issue where user profile pages item "View All" links used ids hence did not link to proper searches. ([#2857](https://github.com/BookStackApp/BookStack/issues/2857))
195
196
197 ### Next Steps
198
199 This will likely be my last feature release before [I leave my current job](https://danb.me/blog/posts/leaving-my-job-to-focus-on-open-source/)
200 and start focusing on BookStack for a while. For the next month or so I'll just be sneaking in bugfixes and minor improvements as patch releases.
201
202 Over the last couple of releases I've made good progress in merging in pending pull requests, so I'll now look to upgrade
203 the framework of BookStack from Laravel 6 to Laravel 8. As part of this I'll probably do some more cleanup of the codebase.
204
205 I'm not sure what I'll be starting with once I'm working on BookStack full time. The search system is in much need of improvement
206 so that may be the first challenge I tackle.
207
208 ----
209
210 <span style="font-size: 0.8em;opacity:0.9;">Header Image Credits: <span>Photo by <a href="https://unsplash.com/@dimitry_b?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Dimitry B</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span></span>