**Breaking changes** The livechat v13 introduced a new library to handle regular expressions in forbidden words, to avoid [ReDOS](https://en.wikipedia.org/wiki/ReDoS) attacks. Unfortunately, this library was not able to install itself properly on some systems, and some admins were not able to install the livechat plugin. That's why we have disabled this library in v14, and introduce a new settings to enable regexp in forbidden words. By default this settings is disabled, and your users won't be able to use regexp in their forbidden words. The risk by enabling this feature is that a malicious user could cause a denial of service for the chat bot, by using a special crafted regular expression in their channel options, and sending a special crafter message in one of their rooms. If you trust your users (those who have rights to livestream), you can enable the settings. Otherwise it is not recommanded. See the documentation for more informations. **Minor changes and fixes** * Channel's forbidden words: new "enable" column. * New settings to enable regular expressions for channel forbidden words. * "Channel advanced configuration" settings: removing the "experimental feature" label.
25 lines
975 B
TypeScript
25 lines
975 B
TypeScript
// SPDX-FileCopyrightText: 2024-2025 John Livingston <https://www.john-livingston.fr/>
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import type { RegisterServerOptions } from '@peertube/peertube-types'
|
|
|
|
/**
|
|
* Livechat v13.0.0: now using xmppjs-chat-bot 0.6.0, which replaced RegExp by RE2.
|
|
* we must change the forbidspecialchar regexp configuration, to be compatible.
|
|
* Livechat v14.0.0: we removed RE2 because of some incompatibility issues.
|
|
* So this update is no more necessary.
|
|
* We won't do any update script to remove the `regexp_engine` attribute we added,
|
|
* the bot will just ignore it. But we keep this function, so that dev can understand
|
|
* the history, and understand why some files have the `regexp_engine` attribute.
|
|
*
|
|
* This script will only be launched one time.
|
|
*/
|
|
async function updateForbidSpecialCharsHandler (_options: RegisterServerOptions): Promise<void> {
|
|
// deprecated (see comments)
|
|
}
|
|
|
|
export {
|
|
updateForbidSpecialCharsHandler
|
|
}
|