Update README.md
[KisSync.git] / NEWS.md
blobc2322c97c5c4a80fc05fdfbd8bc43ec52cb49406
1 2021-08-14
2 ==========
4 CyTube has been upgraded to socket.io v4 (from v2).
6 **Breaking change:** Newer versions of socket.io require CORS to validate the
7 origin initiating the socket connection.  CyTube allows the origins specified in
8 the `io.domain` and `https.domain` configuration keys by default, which should
9 work for many use cases, however, if you host your website on a different domain
10 than the socket connection, you will need to configure the allowed origins (see
11 config.template.yaml under `io.cors`).
13 CyTube enables the `allowEIO3` configuration in socket.io by default, which
14 means that existing clients and bots using socket.io-client v2 should continue
15 to work.
17 2021-08-12
18 ==========
20 The legacy metrics recorder (`counters.log` file) has been removed.  For over 4
21 years now, CyTube has integrated with [Prometheus](https://prometheus.io/),
22 which provides a superior way to monitor the application.  Copy
23 `conf/example/prometheus.toml` to `conf/prometheus.toml` and edit it to
24 configure CyTube's Prometheus support.
26 2021-08-12
27 ==========
29 Due to changes in Soundcloud's authorization scheme, support has been dropped
30 from core due to requiring each server owner to register an API key (which is
31 currently impossible as they have not accepted new API key registrations for
32 *years*).
34 If you happen to already have an API key registered, or if Soundcloud reopens
35 registration at some point in the future, feel free to reach out to me for
36 patches to reintroduce support for it.
38 2020-08-21
39 ==========
41 Some of CyTube's dependencies depends on features in newer versions of node.js.
42 Accordingly, node 10 is no longer supported.  Administrators are recommended to
43 use node 12 (the active LTS), or node 14 (the current version).
45 2020-06-22
46 ==========
48 Twitch has [updated their embed
49 player](https://discuss.dev.twitch.tv/t/twitch-embedded-player-migration-timeline-update/25588),
50 which adds new requirements for embedding Twitch:
52   1. The origin website must be served over HTTPS
53   2. The origin website must be served over the default port (i.e., the hostname
54      cannot include a port; https://example.com:8443 won't work)
56 Additionally, third-party cookies must be enabled for whatever internal
57 subdomains Twitch is using.
59 CyTube now sets the parameters expected by Twitch, and displays an error message
60 if it detects (1) or (2) above are not met.
62 2020-02-15
63 ==========
65 Old versions of CyTube defaulted to storing channel state in flatfiles located
66 in the `chandump` directory.  The default was changed a while ago, and the
67 flatfile storage mechanism has now been removed.
69 Admins who have not already migrated their installation to the "database"
70 channel storage type can do so by following these instructions:
72   1. Run `git checkout e3a9915b454b32e49d3871c94c839899f809520a` to temporarily
73      switch to temporarily revert to the previous version of the code that
74      supports the "file" channel storage type
75   2. Run `npm run build-server` to build the old version
76   3. Run `node lib/channel-storage/migrator.js |& tee migration.log` to migrate
77      channel state from files to the database
78   4. Inspect the output of the migration tool for errors
79   5. Set `channel-storage`/`type` to `"database"` in `config.yaml` and start the
80      server.  Load a channel to verify the migration worked as expected
81   6. Upgrade back to the latest version with `git checkout 3.0` and `npm run
82      build-server`
83   7. Remove the `channel-storage` block from `config.yaml` and remove the
84      `chandump` directory since it is no longer needed (you may wish to archive
85      it somewhere in case you later discover the migration didn't work as
86      expected).
88 If you encounter any errors during the process, please file an issue on GitHub
89 and attach the output of the migration tool (which if you use the above commands
90 will be written to `migration.log`).
92 2019-12-01
93 ==========
95 In accordance with node v8 LTS becoming end-of-life on 2019-12-31, CyTube no
96 longer supports v8.
98 Please upgrade to v10 or v12 (active LTS); refer to
99 https://nodejs.org/en/about/releases/ for the node.js support timelines.
101 2018-12-07
102 ==========
104 Users can now self-service request their account to be deleted, and it will be
105 automatically purged after 7 days.  In order to send a notification email to
106 the user about the request, copy the [email
107 configuration](https://github.com/calzoneman/sync/blob/3.0/conf/example/email.toml#L43)
108 to `conf/email.toml` (the same file used for password reset emails).
110 2018-10-21
111 ==========
113 The `sanitize-html` dependency has made a change that results in `"` no longer
114 being replaced by `"` when not inside an HTML attribute value.  This
115 potentially breaks any chat filters matching quotes as `"` (on my
116 particular instance, this seems to be quite rare).  These filters will need to
117 be updated in order to continue matching quotes.
119 2018-08-27
120 ==========
122 Support for node.js 6.x has been dropped, in order to bump the babel preset to
123 generate more efficient code (8.x supports async-await and other ES6+ features
124 natively and is the current node.js LTS).
126 If you are unable to upgrade to node.js 8.x, you can revert the changes to
127 package.json in this commit, however, be warned that I no longer test on 6.x.
129 2018-06-03
130 ==========
132 ## Dependency upgrades
134 In order to support node.js 10, the `bcrypt` dependency has been upgraded to
135 version 2.  `bcrypt` version 2 defaults to the `$2b$` algorithm, whereas version
136 1 defaults to the `$2a$` algorithm.  Existing password hashes will continue to
137 be readable, however hashes created with version 2 will not be readable by
138 version 1.  See https://github.com/kelektiv/node.bcrypt.js for details.
140 In addition, the optional dependency on `v8-profiler` has been removed, since
141 this is not compatible with newer versions of v8.
143 ## Supported node.js versions
145 In accordance with the node.js release schedule, node.js 4.x, 5.x, 7.x, and 9.x
146 are end-of-life and are no longer maintained upstream.  Accordingly, these
147 versions are no longer supported by CyTube.
149 Please upgrade to 8.x (LTS) or 10.x (current).  6.x is still supported, but is
150 in the "maintenance" phase upstream, and should be phased out.
152 2018-01-07
153 ==========
155 **Build changes:** When the `babel` dependency was first added to transpile ES6
156 code to ES5, an interactive prompt was added to the `postinstall` script before
157 transpilation, in case the user had made local modifications to the files in
158 `lib` which previously would have been detected as a git conflict when pulling.
160 It has now been sufficiently long that this is no longer needed, so I've removed
161 it.  As always, users wishing to make local modifications (or forks) should edit
162 the code in `src/` and run `npm run build-server` to regenerate `lib/`.
164 This commit also removes the bundled `www/js/player.js` file in favor of having
165 `postinstall` generate it from the sources in `player/`.
167 2017-12-24
168 ==========
170 As of December 2017, Vid.me is no longer in service.  Accordingly, Vid.me
171 support in CyTube has been deprecated.
173 2017-11-27
174 ==========
176 The Google Drive userscript has been updated once again. Violentmonkey is
177 now explicitly supported. Google login redirects are caught and handled.
178 See directly below on how to regenerate the user script again.
180 2017-11-15
181 ==========
183 The Google Drive userscript has been updated due to breaking changes in
184 Greasemonkey 4.0.  Remember to generate the script by running:
186     $ npm run generate-userscript "Your Site Name" http://your-site.example.com/r/*
188 2017-11-05
189 ==========
191 The latest commit introduces a referrer check in the account page handlers.
192 This is added as a short-term mitigation for a recent report that account
193 management functions (such as deleting channels) can be executed without the
194 user's consent if placed in channel JS.
196 Longer term options are being considered, such as moving account management to a
197 separate subdomain to take advantage of cross-origin checks in browsers, and
198 requiring the user to re-enter their password to demonstrate intent.  As always,
199 I recommend admins take extreme caution when accepting channel JS.
201 2017-09-26
202 ==========
204 **Breaking change:** the `nodemailer` dependency has been upgraded to version
205 4.x.  I also took this opportunity to make some modifications to the email
206 configuration and move it out of `config.yaml` to `conf/email.toml`.
208 To upgrade:
210   * Run `npm upgrade` (or `rm -rf node_modules; npm install`)
211   * Copy `conf/example/email.toml` to `conf/email.toml`
212   * Edit `conf/email.toml` to your liking
213   * Remove the `mail:` block from `config.yaml`
215 This feature only supports sending via SMTP for now.  If there is demand for
216 other transports, feel free to open an issue or submit a pull request.
218 2017-09-19
219 ==========
221 The `/useragreement` default page has been removed.  Server administrators can
222 substitute their own terms of service page by editing `templates/footer.pug`
224 2017-09-19
225 ==========
227 This commit removes an old kludge that redirected users to HTTPS (when enabled)
228 specifically for the account authorization pages (e.g., `/login`).  The code for
229 doing this was to work around limitations that no longer exist, and does not
230 represent current security best practices.
232 The recommended solution to ensure that users are logged in securely (assuming
233 you've configured support for HTTPS) is to use
234 [Strict-Transport-Security](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security)
235 to direct browsers to access the HTTPS version of the website at all times.  You
236 can enable this by configuring a reverse proxy (e.g. nginx) in front of CyTube
237 to intercept HTTP traffic and redirect it to HTTPS, and add the
238 `Strict-Transport-Security` header when returning the response from CyTube.
240 2017-07-22
241 ==========
243 Support for the old version of Vimeo's OAuth API (the `vimeo-oauth`
244 configuration block) has been dropped.  It's unlikely anyone was using this,
245 since you haven't been able to register new API keys for it in years (it was
246 superseded by a newer OAuth API, which CyTube does not support), and in fact I
247 lost my credentials for this API and no longer have a way to test it.
249 Vimeo videos can still be added -- the metadata will be queried from the
250 anonymous API which has been the default since the beginning.
252 2017-07-17
253 ==========
255 The `stats` database table and associated ACP subpage have been removed in favor
256 of integration with [Prometheus](https://prometheus.io/).  You can enable
257 Prometheus reporting by copying `conf/example/prometheus.toml` to
258 `conf/prometheus.toml` and editing it to your liking.  I recommend integrating
259 Prometheus with [Grafana](https://grafana.com/) for dashboarding needs.
261 The particular metrics that were saved in the `stats` table are reported by the
262 following Prometheus metrics:
264   * Channel count: `cytube_channels_num_active` gauge.
265   * User count: `cytube_sockets_num_connected` gauge (labeled by socket.io
266     transport).
267   * CPU/Memory: default metrics emitted by the
268     [`prom-client`](https://github.com/siimon/prom-client) module.
270 More Prometheus metrics will be added in the future to make CyTube easier to
271 monitor :)
273 2017-07-15
274 ==========
276 The latest commit upgrades `socket.io` to version 2.0, a major version change
277 from 1.4.  This release improves performance by switching to `uws` for the
278 websocket transport, and fixes several bugs; you can read about it
279 [here](https://github.com/socketio/socket.io/releases/tag/2.0.0).
281 For browser clients, the upgrade should basically just work with no
282 intervention.  For node.js clients, all that is needed is to upgrade
283 `socket.io-client` to 2.0.  For other clients, work required may vary depending
284 on whether the implementation has compatibility problems with 2.0.
286 2017-06-20
287 ==========
289 The latest commit drops support for node.js versions below 6 (the [current
290 LTS](https://github.com/nodejs/LTS#lts-schedule1)).  This is to allow the babel
291 preset to avoid generating inefficient code to polyfill ES2015+ features that
292 are now implemented in the node.js core.
294 New versions of node.js can be downloaded from the [node.js
295 website](https://nodejs.org/en/download/), if they are not already available in
296 your distribution's package manager.
298 2017-03-20
299 ==========
301 Polls are now more strictly validated, including the number of options.  The
302 default limit is 50 options, which you can configure via `poll.max-options`.
304 2017-03-11
305 ==========
307 Commit f8183bea1b37154d79db741ac2845adf282e7514 modifes the schema of the
308 `users` table to include a new column (`name_dedupe`) which has a `UNIQUE`
309 constraint.  This column is populated with a modified version of the user's name
310 to prevent the registration of usernames which are bitwise distinct but visually
311 similar.  'l', 'L', and '1' are all mapped to '1'; 'o', 'O', and '0' are all
312 mapped to '0'; '\_' and '-' are mapped to '\_'.  On first startup after
313 upgrading, the new column will be added and populated.
315 This replaces the earlier solution which was put in place to mitigate PR#489 but
316 was overly-restrictive since it wildcarded these characters against *any*
317 character, not just characters in the same group.
319 2017-03-03
320 ==========
322 The dependency on `sanitize-html`, which previously pointed to a fork, has now
323 been switched back to the upstream module.  XSS filtering has been turned off
324 for the chat filter replacement itself (since this provides no additional
325 security), and is now only run on the final chat message after filtering.
326 Certain chat filters and MOTDs which relied on syntactically incorrect HTML,
327 such as unclosed tags, may have different behavior now, since `sanitize-html`
328 fixes these.
330 2016-11-02
331 ==========
333 After upgrading the dependency on `yamljs`, you may see this error if you didn't
334 notice and correct a typo in the config.yaml template:
336     Error loading config file config.yaml:
337     { [Error: Unexpected characters near ",".]
338       message: 'Unexpected characters near ",".',
339       parsedLine: 88,
340       snippet: 'title: \'CyTube\',' }
342 The fix is to edit config.yaml and remove the trailing comma for the `title:`
343 property under `html-template`.  If there are other syntax errors that the old
344 version didn't detect, you will need to correct those as well.
346 Longer term, I am looking to move away from using `yamljs` to parse
347 configuration because it's a little buggy and the current configuration system
348 is confusing.
350 2016-10-20
351 ==========
353 Google Drive changed the URL schema for retrieving video metadata, which broke
354 CyTube's Google Drive support, even with the userscript.  I have updated the
355 userscript source with the new URL, so server administrators will have to
356 regenerate the userscript for their site and users will be prompted to install
357 the newer version.
359 Additionally, fixing Drive lookups required an update to the `mediaquery`
360 module, so you will have to do an `npm install` to pull that fix in.
362 2016-08-23
363 ==========
365 A few weeks ago, the previous Google Drive player stopped working.  This is
366 nothing new; Google Drive has consistently broken a few times a year ever since
367 support for it was added.  However, it's becoming increasingly difficult and
368 complicated to provide good support for Google Drive, so I've made the decision
369 to phase out the native player and require a userscript for it, in order to
370 bypass CORS and allow each browser to request the video stream itself.
372 See [the updated documentation](docs/gdrive-userscript-serveradmins.md) for
373 details on how to enable this for your users.
375 2016-04-27
376 ==========
378 A new dependency has been added on `cytube-common`, a module that will hold
379 common code shared between the current version of CyTube and the upcoming work
380 around splitting it into multiple services.  You will need to be sure to run
381 `npm install` after pulling in this change to pull in the new dependency.
383 2016-01-06
384 ==========
386 This release updates socket.io to version 1.4.0.  The updates to socket.io
387 include a few security-related fixes, so please be sure to run `npm install`
388 to ensure the updated version is installed before restarting your CyTube server.
390   * https://nodesecurity.io/advisories/67
391   * https://github.com/socketio/engine.io/commit/391ce0dc8b88a6609d88db83ea064040a05ab803
393 2015-10-25
394 ==========
396 In order to support future clustering support, the legacy `/sioconfig`
397 endpoint is being deprecated.  Instead, you should make a request to
398 `/socketconfig/<channel name>.json`.  See [the
399 documentation](docs/socketconfig.md) for more information.
401 2015-10-04
402 ==========
404   * The channel data storage system has been refactored a bit.  For
405     compatibility, the default remains to store JSON objects for each channel in
406     the `chandump` folder, however there is now also the option of storing
407     channel data in the database.  You can take advantage of this by setting
408     `channel-storage: type: 'database'` in your `config.yaml`.
409     - In order to migrate existing channel data from the `chandump` files to the
410       database, run `node lib/channel-storage/migrate.js`.
411   * The database storage method uses foreign keys to associate the channel data
412     with the corresponding row in the `channels` table.  This requires that the
413     tables be stored using the InnoDB engine rather than MyISAM.  If your CyTube
414     tables defaulted to MyISAM, you can fix them by running
416     ```sql
417     ALTER TABLE `channels` ENGINE = InnoDB;
418     ```
420 2015-09-21
421 ==========
423   * CyTube is now transpiled with [babel] to allow the use of ES6/ES2015
424     features.  All source files have been moved from `lib` to `src`.
425   * Running `npm install` or `npm run postinstall` will prompt you to
426     build from `src` to `lib`.
427   * Running `npm run build-server` will run the build script without any
428     prompts.
429   * After updating with `git pull`, you should run `npm install` or `npm run
430     build-server` in order to rebuild after the changes.
432 [babel]: https://babeljs.io/
434 2015-07-25
435 ==========
437   * CyTube now supports subtitles for Google Drive videos.  In order to take
438     advantage of this, you must upgrade mediaquery by running `npm install
439     cytube/mediaquery`.  Subtitles are cached in the google-drive-subtitles
440     folder.
442 2015-07-07
443 ==========
445   * CyTube and CyTube/mediaquery have both been updated to use
446     calzoneman/status-message-polyfill to polyfill res.statusMessage on older
447     versions of node (e.g., v0.10).  After pulling, run `npm install` to update
448     this dependency.  This fixes an issue where HTTP status messages from
449     mediaquery were reported as `undefined`, and removes the need for manually
450     looking up status messages in `lib/ffmpeg.js`.
452 2015-07-06
453 ==========
455   * As part of the video player rewrite, Google Drive and Google+ metadata
456     lookups are now offloaded to CyTube/mediaquery.  After pulling the new
457     changes, run `npm install` or `npm update` to update the mediaquery
458     dependency.
460   * `www/js/player.js` is now built from the CoffeeScript source files in the
461     `player/` directory.  Instead of modifying it directly, modify the relevant
462     player implementations in `player/` and run `npm run build-player` (or `node
463     build-player.js`) to generate `www/js/player.js`.
465   * Also as part of the video player rewrite, the schema for custom embeds
466     changed so any custom embeds stored in the `channel_libraries` table need to
467     be updated.  The automatic upgrade script will convert any custom embeds
468     that are parseable (i.e., not truncated by the width of the `id` field using
469     the old format) and will delete the rest (you may see a lot of WARNING:
470     unable to convert xxx messages-- this is normal).  Custom embeds in channel
471     playlists in the chandumps will be converted when the channel is loaded.