Save of lib adjustments for anon posting
[KisSync.git] / NEWS.md
blob7cb66bd9aefda13a17c52fc795c17fb4cc147539
1 2018-12-07
2 ==========
4 Users can now self-service request their account to be deleted, and it will be
5 automatically purged after 7 days.  In order to send a notification email to
6 the user about the request, copy the [email
7 configuration](https://github.com/calzoneman/sync/blob/3.0/conf/example/email.toml#L43)
8 to `conf/email.toml` (the same file used for password reset emails).
10 2018-10-21
11 ==========
13 The `sanitize-html` dependency has made a change that results in `"` no longer
14 being replaced by `"` when not inside an HTML attribute value.  This
15 potentially breaks any chat filters matching quotes as `"` (on my
16 particular instance, this seems to be quite rare).  These filters will need to
17 be updated in order to continue matching quotes.
19 2018-08-27
20 ==========
22 Support for node.js 6.x has been dropped, in order to bump the babel preset to
23 generate more efficient code (8.x supports async-await and other ES6+ features
24 natively and is the current node.js LTS).
26 If you are unable to upgrade to node.js 8.x, you can revert the changes to
27 package.json in this commit, however, be warned that I no longer test on 6.x.
29 2018-06-03
30 ==========
32 ## Dependency upgrades
34 In order to support node.js 10, the `bcrypt` dependency has been upgraded to
35 version 2.  `bcrypt` version 2 defaults to the `$2b$` algorithm, whereas version
36 1 defaults to the `$2a$` algorithm.  Existing password hashes will continue to
37 be readable, however hashes created with version 2 will not be readable by
38 version 1.  See https://github.com/kelektiv/node.bcrypt.js for details.
40 In addition, the optional dependency on `v8-profiler` has been removed, since
41 this is not compatible with newer versions of v8.
43 ## Supported node.js versions
45 In accordance with the node.js release schedule, node.js 4.x, 5.x, 7.x, and 9.x
46 are end-of-life and are no longer maintained upstream.  Accordingly, these
47 versions are no longer supported by CyTube.
49 Please upgrade to 8.x (LTS) or 10.x (current).  6.x is still supported, but is
50 in the "maintenance" phase upstream, and should be phased out.
52 2018-01-07
53 ==========
55 **Build changes:** When the `babel` dependency was first added to transpile ES6
56 code to ES5, an interactive prompt was added to the `postinstall` script before
57 transpilation, in case the user had made local modifications to the files in
58 `lib` which previously would have been detected as a git conflict when pulling.
60 It has now been sufficiently long that this is no longer needed, so I've removed
61 it.  As always, users wishing to make local modifications (or forks) should edit
62 the code in `src/` and run `npm run build-server` to regenerate `lib/`.
64 This commit also removes the bundled `www/js/player.js` file in favor of having
65 `postinstall` generate it from the sources in `player/`.
67 2017-12-24
68 ==========
70 As of December 2017, Vid.me is no longer in service.  Accordingly, Vid.me
71 support in CyTube has been deprecated.
73 2017-11-27
74 ==========
76 The Google Drive userscript has been updated once again. Violentmonkey is
77 now explicitly supported. Google login redirects are caught and handled.
78 See directly below on how to regenerate the user script again.
80 2017-11-15
81 ==========
83 The Google Drive userscript has been updated due to breaking changes in
84 Greasemonkey 4.0.  Remember to generate the script by running:
86     $ npm run generate-userscript "Your Site Name" http://your-site.example.com/r/*
88 2017-11-05
89 ==========
91 The latest commit introduces a referrer check in the account page handlers.
92 This is added as a short-term mitigation for a recent report that account
93 management functions (such as deleting channels) can be executed without the
94 user's consent if placed in channel JS.
96 Longer term options are being considered, such as moving account management to a
97 separate subdomain to take advantage of cross-origin checks in browsers, and
98 requiring the user to re-enter their password to demonstrate intent.  As always,
99 I recommend admins take extreme caution when accepting channel JS.
101 2017-09-26
102 ==========
104 **Breaking change:** the `nodemailer` dependency has been upgraded to version
105 4.x.  I also took this opportunity to make some modifications to the email
106 configuration and move it out of `config.yaml` to `conf/email.toml`.
108 To upgrade:
110   * Run `npm upgrade` (or `rm -rf node_modules; npm install`)
111   * Copy `conf/example/email.toml` to `conf/email.toml`
112   * Edit `conf/email.toml` to your liking
113   * Remove the `mail:` block from `config.yaml`
115 This feature only supports sending via SMTP for now.  If there is demand for
116 other transports, feel free to open an issue or submit a pull request.
118 2017-09-19
119 ==========
121 The `/useragreement` default page has been removed.  Server administrators can
122 substitute their own terms of service page by editing `templates/footer.pug`
124 2017-09-19
125 ==========
127 This commit removes an old kludge that redirected users to HTTPS (when enabled)
128 specifically for the account authorization pages (e.g., `/login`).  The code for
129 doing this was to work around limitations that no longer exist, and does not
130 represent current security best practices.
132 The recommended solution to ensure that users are logged in securely (assuming
133 you've configured support for HTTPS) is to use
134 [Strict-Transport-Security](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security)
135 to direct browsers to access the HTTPS version of the website at all times.  You
136 can enable this by configuring a reverse proxy (e.g. nginx) in front of CyTube
137 to intercept HTTP traffic and redirect it to HTTPS, and add the
138 `Strict-Transport-Security` header when returning the response from CyTube.
140 2017-07-22
141 ==========
143 Support for the old version of Vimeo's OAuth API (the `vimeo-oauth`
144 configuration block) has been dropped.  It's unlikely anyone was using this,
145 since you haven't been able to register new API keys for it in years (it was
146 superseded by a newer OAuth API, which CyTube does not support), and in fact I
147 lost my credentials for this API and no longer have a way to test it.
149 Vimeo videos can still be added -- the metadata will be queried from the
150 anonymous API which has been the default since the beginning.
152 2017-07-17
153 ==========
155 The `stats` database table and associated ACP subpage have been removed in favor
156 of integration with [Prometheus](https://prometheus.io/).  You can enable
157 Prometheus reporting by copying `conf/example/prometheus.toml` to
158 `conf/prometheus.toml` and editing it to your liking.  I recommend integrating
159 Prometheus with [Grafana](https://grafana.com/) for dashboarding needs.
161 The particular metrics that were saved in the `stats` table are reported by the
162 following Prometheus metrics:
164   * Channel count: `cytube_channels_num_active` gauge.
165   * User count: `cytube_sockets_num_connected` gauge (labeled by socket.io
166     transport).
167   * CPU/Memory: default metrics emitted by the
168     [`prom-client`](https://github.com/siimon/prom-client) module.
170 More Prometheus metrics will be added in the future to make CyTube easier to
171 monitor :)
173 2017-07-15
174 ==========
176 The latest commit upgrades `socket.io` to version 2.0, a major version change
177 from 1.4.  This release improves performance by switching to `uws` for the
178 websocket transport, and fixes several bugs; you can read about it
179 [here](https://github.com/socketio/socket.io/releases/tag/2.0.0).
181 For browser clients, the upgrade should basically just work with no
182 intervention.  For node.js clients, all that is needed is to upgrade
183 `socket.io-client` to 2.0.  For other clients, work required may vary depending
184 on whether the implementation has compatibility problems with 2.0.
186 2017-06-20
187 ==========
189 The latest commit drops support for node.js versions below 6 (the [current
190 LTS](https://github.com/nodejs/LTS#lts-schedule1)).  This is to allow the babel
191 preset to avoid generating inefficient code to polyfill ES2015+ features that
192 are now implemented in the node.js core.
194 New versions of node.js can be downloaded from the [node.js
195 website](https://nodejs.org/en/download/), if they are not already available in
196 your distribution's package manager.
198 2017-03-20
199 ==========
201 Polls are now more strictly validated, including the number of options.  The
202 default limit is 50 options, which you can configure via `poll.max-options`.
204 2017-03-11
205 ==========
207 Commit f8183bea1b37154d79db741ac2845adf282e7514 modifes the schema of the
208 `users` table to include a new column (`name_dedupe`) which has a `UNIQUE`
209 constraint.  This column is populated with a modified version of the user's name
210 to prevent the registration of usernames which are bitwise distinct but visually
211 similar.  'l', 'L', and '1' are all mapped to '1'; 'o', 'O', and '0' are all
212 mapped to '0'; '\_' and '-' are mapped to '\_'.  On first startup after
213 upgrading, the new column will be added and populated.
215 This replaces the earlier solution which was put in place to mitigate PR#489 but
216 was overly-restrictive since it wildcarded these characters against *any*
217 character, not just characters in the same group.
219 2017-03-03
220 ==========
222 The dependency on `sanitize-html`, which previously pointed to a fork, has now
223 been switched back to the upstream module.  XSS filtering has been turned off
224 for the chat filter replacement itself (since this provides no additional
225 security), and is now only run on the final chat message after filtering.
226 Certain chat filters and MOTDs which relied on syntactically incorrect HTML,
227 such as unclosed tags, may have different behavior now, since `sanitize-html`
228 fixes these.
230 2016-11-02
231 ==========
233 After upgrading the dependency on `yamljs`, you may see this error if you didn't
234 notice and correct a typo in the config.yaml template:
236     Error loading config file config.yaml:
237     { [Error: Unexpected characters near ",".]
238       message: 'Unexpected characters near ",".',
239       parsedLine: 88,
240       snippet: 'title: \'CyTube\',' }
242 The fix is to edit config.yaml and remove the trailing comma for the `title:`
243 property under `html-template`.  If there are other syntax errors that the old
244 version didn't detect, you will need to correct those as well.
246 Longer term, I am looking to move away from using `yamljs` to parse
247 configuration because it's a little buggy and the current configuration system
248 is confusing.
250 2016-10-20
251 ==========
253 Google Drive changed the URL schema for retrieving video metadata, which broke
254 CyTube's Google Drive support, even with the userscript.  I have updated the
255 userscript source with the new URL, so server administrators will have to
256 regenerate the userscript for their site and users will be prompted to install
257 the newer version.
259 Additionally, fixing Drive lookups required an update to the `mediaquery`
260 module, so you will have to do an `npm install` to pull that fix in.
262 2016-08-23
263 ==========
265 A few weeks ago, the previous Google Drive player stopped working.  This is
266 nothing new; Google Drive has consistently broken a few times a year ever since
267 support for it was added.  However, it's becoming increasingly difficult and
268 complicated to provide good support for Google Drive, so I've made the decision
269 to phase out the native player and require a userscript for it, in order to
270 bypass CORS and allow each browser to request the video stream itself.
272 See [the updated documentation](docs/gdrive-userscript-serveradmins.md) for
273 details on how to enable this for your users.
275 2016-04-27
276 ==========
278 A new dependency has been added on `cytube-common`, a module that will hold
279 common code shared between the current version of CyTube and the upcoming work
280 around splitting it into multiple services.  You will need to be sure to run
281 `npm install` after pulling in this change to pull in the new dependency.
283 2016-01-06
284 ==========
286 This release updates socket.io to version 1.4.0.  The updates to socket.io
287 include a few security-related fixes, so please be sure to run `npm install`
288 to ensure the updated version is installed before restarting your CyTube server.
290   * https://nodesecurity.io/advisories/67
291   * https://github.com/socketio/engine.io/commit/391ce0dc8b88a6609d88db83ea064040a05ab803
293 2015-10-25
294 ==========
296 In order to support future clustering support, the legacy `/sioconfig`
297 endpoint is being deprecated.  Instead, you should make a request to
298 `/socketconfig/<channel name>.json`.  See [the
299 documentation](docs/socketconfig.md) for more information.
301 2015-10-04
302 ==========
304   * The channel data storage system has been refactored a bit.  For
305     compatibility, the default remains to store JSON objects for each channel in
306     the `chandump` folder, however there is now also the option of storing
307     channel data in the database.  You can take advantage of this by setting
308     `channel-storage: type: 'database'` in your `config.yaml`.
309     - In order to migrate existing channel data from the `chandump` files to the
310       database, run `node lib/channel-storage/migrate.js`.
311   * The database storage method uses foreign keys to associate the channel data
312     with the corresponding row in the `channels` table.  This requires that the
313     tables be stored using the InnoDB engine rather than MyISAM.  If your CyTube
314     tables defaulted to MyISAM, you can fix them by running
316     ```sql
317     ALTER TABLE `channels` ENGINE = InnoDB;
318     ```
320 2015-09-21
321 ==========
323   * CyTube is now transpiled with [babel] to allow the use of ES6/ES2015
324     features.  All source files have been moved from `lib` to `src`.
325   * Running `npm install` or `npm run postinstall` will prompt you to
326     build from `src` to `lib`.
327   * Running `npm run build-server` will run the build script without any
328     prompts.
329   * After updating with `git pull`, you should run `npm install` or `npm run
330     build-server` in order to rebuild after the changes.
332 [babel]: https://babeljs.io/
334 2015-07-25
335 ==========
337   * CyTube now supports subtitles for Google Drive videos.  In order to take
338     advantage of this, you must upgrade mediaquery by running `npm install
339     cytube/mediaquery`.  Subtitles are cached in the google-drive-subtitles
340     folder.
342 2015-07-07
343 ==========
345   * CyTube and CyTube/mediaquery have both been updated to use
346     calzoneman/status-message-polyfill to polyfill res.statusMessage on older
347     versions of node (e.g., v0.10).  After pulling, run `npm install` to update
348     this dependency.  This fixes an issue where HTTP status messages from
349     mediaquery were reported as `undefined`, and removes the need for manually
350     looking up status messages in `lib/ffmpeg.js`.
352 2015-07-06
353 ==========
355   * As part of the video player rewrite, Google Drive and Google+ metadata
356     lookups are now offloaded to CyTube/mediaquery.  After pulling the new
357     changes, run `npm install` or `npm update` to update the mediaquery
358     dependency.
360   * `www/js/player.js` is now built from the CoffeeScript source files in the
361     `player/` directory.  Instead of modifying it directly, modify the relevant
362     player implementations in `player/` and run `npm run build-player` (or `node
363     build-player.js`) to generate `www/js/player.js`.
365   * Also as part of the video player rewrite, the schema for custom embeds
366     changed so any custom embeds stored in the `channel_libraries` table need to
367     be updated.  The automatic upgrade script will convert any custom embeds
368     that are parseable (i.e., not truncated by the width of the `id` field using
369     the old format) and will delete the rest (you may see a lot of WARNING:
370     unable to convert xxx messages-- this is normal).  Custom embeds in channel
371     playlists in the chandumps will be converted when the channel is loaded.