4 Some of CyTube's dependencies depends on features in newer versions of node.js.
5 Accordingly, node 10 is no longer supported. Administrators are recommended to
6 use node 12 (the active LTS), or node 14 (the current version).
11 Twitch has [updated their embed
12 player](https://discuss.dev.twitch.tv/t/twitch-embedded-player-migration-timeline-update/25588),
13 which adds new requirements for embedding Twitch:
15 1. The origin website must be served over HTTPS
16 2. The origin website must be served over the default port (i.e., the hostname
17 cannot include a port; https://example.com:8443 won't work)
19 Additionally, third-party cookies must be enabled for whatever internal
20 subdomains Twitch is using.
22 CyTube now sets the parameters expected by Twitch, and displays an error message
23 if it detects (1) or (2) above are not met.
28 Old versions of CyTube defaulted to storing channel state in flatfiles located
29 in the `chandump` directory. The default was changed a while ago, and the
30 flatfile storage mechanism has now been removed.
32 Admins who have not already migrated their installation to the "database"
33 channel storage type can do so by following these instructions:
35 1. Run `git checkout e3a9915b454b32e49d3871c94c839899f809520a` to temporarily
36 switch to temporarily revert to the previous version of the code that
37 supports the "file" channel storage type
38 2. Run `npm run build-server` to build the old version
39 3. Run `node lib/channel-storage/migrator.js |& tee migration.log` to migrate
40 channel state from files to the database
41 4. Inspect the output of the migration tool for errors
42 5. Set `channel-storage`/`type` to `"database"` in `config.yaml` and start the
43 server. Load a channel to verify the migration worked as expected
44 6. Upgrade back to the latest version with `git checkout 3.0` and `npm run
46 7. Remove the `channel-storage` block from `config.yaml` and remove the
47 `chandump` directory since it is no longer needed (you may wish to archive
48 it somewhere in case you later discover the migration didn't work as
51 If you encounter any errors during the process, please file an issue on GitHub
52 and attach the output of the migration tool (which if you use the above commands
53 will be written to `migration.log`).
58 In accordance with node v8 LTS becoming end-of-life on 2019-12-31, CyTube no
61 Please upgrade to v10 or v12 (active LTS); refer to
62 https://nodejs.org/en/about/releases/ for the node.js support timelines.
67 Users can now self-service request their account to be deleted, and it will be
68 automatically purged after 7 days. In order to send a notification email to
69 the user about the request, copy the [email
70 configuration](https://github.com/calzoneman/sync/blob/3.0/conf/example/email.toml#L43)
71 to `conf/email.toml` (the same file used for password reset emails).
76 The `sanitize-html` dependency has made a change that results in `"` no longer
77 being replaced by `"` when not inside an HTML attribute value. This
78 potentially breaks any chat filters matching quotes as `"` (on my
79 particular instance, this seems to be quite rare). These filters will need to
80 be updated in order to continue matching quotes.
85 Support for node.js 6.x has been dropped, in order to bump the babel preset to
86 generate more efficient code (8.x supports async-await and other ES6+ features
87 natively and is the current node.js LTS).
89 If you are unable to upgrade to node.js 8.x, you can revert the changes to
90 package.json in this commit, however, be warned that I no longer test on 6.x.
95 ## Dependency upgrades
97 In order to support node.js 10, the `bcrypt` dependency has been upgraded to
98 version 2. `bcrypt` version 2 defaults to the `$2b$` algorithm, whereas version
99 1 defaults to the `$2a$` algorithm. Existing password hashes will continue to
100 be readable, however hashes created with version 2 will not be readable by
101 version 1. See https://github.com/kelektiv/node.bcrypt.js for details.
103 In addition, the optional dependency on `v8-profiler` has been removed, since
104 this is not compatible with newer versions of v8.
106 ## Supported node.js versions
108 In accordance with the node.js release schedule, node.js 4.x, 5.x, 7.x, and 9.x
109 are end-of-life and are no longer maintained upstream. Accordingly, these
110 versions are no longer supported by CyTube.
112 Please upgrade to 8.x (LTS) or 10.x (current). 6.x is still supported, but is
113 in the "maintenance" phase upstream, and should be phased out.
118 **Build changes:** When the `babel` dependency was first added to transpile ES6
119 code to ES5, an interactive prompt was added to the `postinstall` script before
120 transpilation, in case the user had made local modifications to the files in
121 `lib` which previously would have been detected as a git conflict when pulling.
123 It has now been sufficiently long that this is no longer needed, so I've removed
124 it. As always, users wishing to make local modifications (or forks) should edit
125 the code in `src/` and run `npm run build-server` to regenerate `lib/`.
127 This commit also removes the bundled `www/js/player.js` file in favor of having
128 `postinstall` generate it from the sources in `player/`.
133 As of December 2017, Vid.me is no longer in service. Accordingly, Vid.me
134 support in CyTube has been deprecated.
139 The Google Drive userscript has been updated once again. Violentmonkey is
140 now explicitly supported. Google login redirects are caught and handled.
141 See directly below on how to regenerate the user script again.
146 The Google Drive userscript has been updated due to breaking changes in
147 Greasemonkey 4.0. Remember to generate the script by running:
149 $ npm run generate-userscript "Your Site Name" http://your-site.example.com/r/*
154 The latest commit introduces a referrer check in the account page handlers.
155 This is added as a short-term mitigation for a recent report that account
156 management functions (such as deleting channels) can be executed without the
157 user's consent if placed in channel JS.
159 Longer term options are being considered, such as moving account management to a
160 separate subdomain to take advantage of cross-origin checks in browsers, and
161 requiring the user to re-enter their password to demonstrate intent. As always,
162 I recommend admins take extreme caution when accepting channel JS.
167 **Breaking change:** the `nodemailer` dependency has been upgraded to version
168 4.x. I also took this opportunity to make some modifications to the email
169 configuration and move it out of `config.yaml` to `conf/email.toml`.
173 * Run `npm upgrade` (or `rm -rf node_modules; npm install`)
174 * Copy `conf/example/email.toml` to `conf/email.toml`
175 * Edit `conf/email.toml` to your liking
176 * Remove the `mail:` block from `config.yaml`
178 This feature only supports sending via SMTP for now. If there is demand for
179 other transports, feel free to open an issue or submit a pull request.
184 The `/useragreement` default page has been removed. Server administrators can
185 substitute their own terms of service page by editing `templates/footer.pug`
190 This commit removes an old kludge that redirected users to HTTPS (when enabled)
191 specifically for the account authorization pages (e.g., `/login`). The code for
192 doing this was to work around limitations that no longer exist, and does not
193 represent current security best practices.
195 The recommended solution to ensure that users are logged in securely (assuming
196 you've configured support for HTTPS) is to use
197 [Strict-Transport-Security](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security)
198 to direct browsers to access the HTTPS version of the website at all times. You
199 can enable this by configuring a reverse proxy (e.g. nginx) in front of CyTube
200 to intercept HTTP traffic and redirect it to HTTPS, and add the
201 `Strict-Transport-Security` header when returning the response from CyTube.
206 Support for the old version of Vimeo's OAuth API (the `vimeo-oauth`
207 configuration block) has been dropped. It's unlikely anyone was using this,
208 since you haven't been able to register new API keys for it in years (it was
209 superseded by a newer OAuth API, which CyTube does not support), and in fact I
210 lost my credentials for this API and no longer have a way to test it.
212 Vimeo videos can still be added -- the metadata will be queried from the
213 anonymous API which has been the default since the beginning.
218 The `stats` database table and associated ACP subpage have been removed in favor
219 of integration with [Prometheus](https://prometheus.io/). You can enable
220 Prometheus reporting by copying `conf/example/prometheus.toml` to
221 `conf/prometheus.toml` and editing it to your liking. I recommend integrating
222 Prometheus with [Grafana](https://grafana.com/) for dashboarding needs.
224 The particular metrics that were saved in the `stats` table are reported by the
225 following Prometheus metrics:
227 * Channel count: `cytube_channels_num_active` gauge.
228 * User count: `cytube_sockets_num_connected` gauge (labeled by socket.io
230 * CPU/Memory: default metrics emitted by the
231 [`prom-client`](https://github.com/siimon/prom-client) module.
233 More Prometheus metrics will be added in the future to make CyTube easier to
239 The latest commit upgrades `socket.io` to version 2.0, a major version change
240 from 1.4. This release improves performance by switching to `uws` for the
241 websocket transport, and fixes several bugs; you can read about it
242 [here](https://github.com/socketio/socket.io/releases/tag/2.0.0).
244 For browser clients, the upgrade should basically just work with no
245 intervention. For node.js clients, all that is needed is to upgrade
246 `socket.io-client` to 2.0. For other clients, work required may vary depending
247 on whether the implementation has compatibility problems with 2.0.
252 The latest commit drops support for node.js versions below 6 (the [current
253 LTS](https://github.com/nodejs/LTS#lts-schedule1)). This is to allow the babel
254 preset to avoid generating inefficient code to polyfill ES2015+ features that
255 are now implemented in the node.js core.
257 New versions of node.js can be downloaded from the [node.js
258 website](https://nodejs.org/en/download/), if they are not already available in
259 your distribution's package manager.
264 Polls are now more strictly validated, including the number of options. The
265 default limit is 50 options, which you can configure via `poll.max-options`.
270 Commit f8183bea1b37154d79db741ac2845adf282e7514 modifes the schema of the
271 `users` table to include a new column (`name_dedupe`) which has a `UNIQUE`
272 constraint. This column is populated with a modified version of the user's name
273 to prevent the registration of usernames which are bitwise distinct but visually
274 similar. 'l', 'L', and '1' are all mapped to '1'; 'o', 'O', and '0' are all
275 mapped to '0'; '\_' and '-' are mapped to '\_'. On first startup after
276 upgrading, the new column will be added and populated.
278 This replaces the earlier solution which was put in place to mitigate PR#489 but
279 was overly-restrictive since it wildcarded these characters against *any*
280 character, not just characters in the same group.
285 The dependency on `sanitize-html`, which previously pointed to a fork, has now
286 been switched back to the upstream module. XSS filtering has been turned off
287 for the chat filter replacement itself (since this provides no additional
288 security), and is now only run on the final chat message after filtering.
289 Certain chat filters and MOTDs which relied on syntactically incorrect HTML,
290 such as unclosed tags, may have different behavior now, since `sanitize-html`
296 After upgrading the dependency on `yamljs`, you may see this error if you didn't
297 notice and correct a typo in the config.yaml template:
299 Error loading config file config.yaml:
300 { [Error: Unexpected characters near ",".]
301 message: 'Unexpected characters near ",".',
303 snippet: 'title: \'CyTube\',' }
305 The fix is to edit config.yaml and remove the trailing comma for the `title:`
306 property under `html-template`. If there are other syntax errors that the old
307 version didn't detect, you will need to correct those as well.
309 Longer term, I am looking to move away from using `yamljs` to parse
310 configuration because it's a little buggy and the current configuration system
316 Google Drive changed the URL schema for retrieving video metadata, which broke
317 CyTube's Google Drive support, even with the userscript. I have updated the
318 userscript source with the new URL, so server administrators will have to
319 regenerate the userscript for their site and users will be prompted to install
322 Additionally, fixing Drive lookups required an update to the `mediaquery`
323 module, so you will have to do an `npm install` to pull that fix in.
328 A few weeks ago, the previous Google Drive player stopped working. This is
329 nothing new; Google Drive has consistently broken a few times a year ever since
330 support for it was added. However, it's becoming increasingly difficult and
331 complicated to provide good support for Google Drive, so I've made the decision
332 to phase out the native player and require a userscript for it, in order to
333 bypass CORS and allow each browser to request the video stream itself.
335 See [the updated documentation](docs/gdrive-userscript-serveradmins.md) for
336 details on how to enable this for your users.
341 A new dependency has been added on `cytube-common`, a module that will hold
342 common code shared between the current version of CyTube and the upcoming work
343 around splitting it into multiple services. You will need to be sure to run
344 `npm install` after pulling in this change to pull in the new dependency.
349 This release updates socket.io to version 1.4.0. The updates to socket.io
350 include a few security-related fixes, so please be sure to run `npm install`
351 to ensure the updated version is installed before restarting your CyTube server.
353 * https://nodesecurity.io/advisories/67
354 * https://github.com/socketio/engine.io/commit/391ce0dc8b88a6609d88db83ea064040a05ab803
359 In order to support future clustering support, the legacy `/sioconfig`
360 endpoint is being deprecated. Instead, you should make a request to
361 `/socketconfig/<channel name>.json`. See [the
362 documentation](docs/socketconfig.md) for more information.
367 * The channel data storage system has been refactored a bit. For
368 compatibility, the default remains to store JSON objects for each channel in
369 the `chandump` folder, however there is now also the option of storing
370 channel data in the database. You can take advantage of this by setting
371 `channel-storage: type: 'database'` in your `config.yaml`.
372 - In order to migrate existing channel data from the `chandump` files to the
373 database, run `node lib/channel-storage/migrate.js`.
374 * The database storage method uses foreign keys to associate the channel data
375 with the corresponding row in the `channels` table. This requires that the
376 tables be stored using the InnoDB engine rather than MyISAM. If your CyTube
377 tables defaulted to MyISAM, you can fix them by running
380 ALTER TABLE `channels` ENGINE = InnoDB;
386 * CyTube is now transpiled with [babel] to allow the use of ES6/ES2015
387 features. All source files have been moved from `lib` to `src`.
388 * Running `npm install` or `npm run postinstall` will prompt you to
389 build from `src` to `lib`.
390 * Running `npm run build-server` will run the build script without any
392 * After updating with `git pull`, you should run `npm install` or `npm run
393 build-server` in order to rebuild after the changes.
395 [babel]: https://babeljs.io/
400 * CyTube now supports subtitles for Google Drive videos. In order to take
401 advantage of this, you must upgrade mediaquery by running `npm install
402 cytube/mediaquery`. Subtitles are cached in the google-drive-subtitles
408 * CyTube and CyTube/mediaquery have both been updated to use
409 calzoneman/status-message-polyfill to polyfill res.statusMessage on older
410 versions of node (e.g., v0.10). After pulling, run `npm install` to update
411 this dependency. This fixes an issue where HTTP status messages from
412 mediaquery were reported as `undefined`, and removes the need for manually
413 looking up status messages in `lib/ffmpeg.js`.
418 * As part of the video player rewrite, Google Drive and Google+ metadata
419 lookups are now offloaded to CyTube/mediaquery. After pulling the new
420 changes, run `npm install` or `npm update` to update the mediaquery
423 * `www/js/player.js` is now built from the CoffeeScript source files in the
424 `player/` directory. Instead of modifying it directly, modify the relevant
425 player implementations in `player/` and run `npm run build-player` (or `node
426 build-player.js`) to generate `www/js/player.js`.
428 * Also as part of the video player rewrite, the schema for custom embeds
429 changed so any custom embeds stored in the `channel_libraries` table need to
430 be updated. The automatic upgrade script will convert any custom embeds
431 that are parseable (i.e., not truncated by the width of the `id` field using
432 the old format) and will delete the rest (you may see a lot of WARNING:
433 unable to convert xxx messages-- this is normal). Custom embeds in channel
434 playlists in the chandumps will be converted when the channel is loaded.