Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Merge 2.6.11 into 2.7 #18392

Merged
merged 20 commits into from Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
26dea60
Fix permission issue with Etherpad 1.9.1
danielpetri1 Jul 4, 2023
3c19c25
bbb-presentation-video: Update to 4.0.3
kepstin Jul 17, 2023
19ea189
restore messages tab stop and arrow key navigation
KDSBrowne Jul 18, 2023
0c934c7
restore captions list keyboard access
KDSBrowne Jul 19, 2023
2d504a1
Merge pull request #18276 from danielpetri1/etherpad-1.9.0
antobinary Jul 24, 2023
42557ee
chore: Bump bbb-pads to 1.5.0
antobinary Jul 24, 2023
fe23c8f
Merge pull request #18330 from kepstin/bbb-presentation-video
antobinary Jul 24, 2023
096f65d
Merge pull request #18347 from KDSBrowne/bbb-a11y-patches-02
antobinary Jul 24, 2023
8d5e43e
Merge pull request #18375 from bigbluebutton/antobinary-patch-1
antobinary Jul 24, 2023
0bd5e96
chore: Bump bbb-pads to 1.5.1
antobinary Jul 25, 2023
427ca9a
Merge pull request #18382 from bigbluebutton/antobinary-patch-2
antobinary Jul 25, 2023
abf4a0a
chore: Bump BBB version to 2.6.11
antobinary Jul 25, 2023
842cfb4
ci: fix new bbb-imdt url
antonbsa Jul 25, 2023
32d2b1d
Merge pull request #18388 from antonbsa/ci-url-backport-26
antobinary Jul 26, 2023
b31ba3f
test: fix connection status element selector
antonbsa Jul 24, 2023
5462fe6
Merge pull request #18391 from antonbsa/test-cs-backport
antobinary Jul 26, 2023
838accf
Improve text sanitizing of lobby messages
Tainan404 Jul 26, 2023
304bc85
Merge pull request from GHSA-v6wg-q866-h73x
antobinary Jul 26, 2023
94252fc
docs: Added link for 2.6.11
antobinary Jul 27, 2023
7be38fd
Merge remote-tracking branch 'bbb/v2.6.x-release' into merge-july26
antobinary Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bbb-etherpad.placeholder.sh
@@ -1,2 +1,2 @@
git clone --branch 1.8.17 --depth 1 https://github.com/ether/etherpad-lite bbb-etherpad
git clone --branch 1.9.1 --depth 1 https://github.com/ether/etherpad-lite bbb-etherpad

2 changes: 1 addition & 1 deletion bbb-pads.placeholder.sh
@@ -1 +1 @@
git clone --branch v1.4.1 --depth 1 https://github.com/bigbluebutton/bbb-pads bbb-pads
git clone --branch v1.5.1 --depth 1 https://github.com/bigbluebutton/bbb-pads bbb-pads
2 changes: 1 addition & 1 deletion bbb-presentation-video.placeholder.sh
@@ -1,6 +1,6 @@
#!/bin/sh
set -ex
RELEASE=4.0.2
RELEASE=4.0.3
cat <<MSG
This tool downloads prebuilt packages built on Github Actions
The corresponding source can be browsed at https://github.com/bigbluebutton/bbb-presentation-video/tree/${RELEASE}
Expand Down
3 changes: 2 additions & 1 deletion bigbluebutton-config/bigbluebutton-release
@@ -1 +1,2 @@
BIGBLUEBUTTON_RELEASE=2.7.0-beta.2
BIGBLUEBUTTON_RELEASE=2.7.0-beta.3

25 changes: 25 additions & 0 deletions bigbluebutton-html5/imports/api/common/server/helpers.js
@@ -1,9 +1,34 @@
import Users from '/imports/api/users';
import Logger from '/imports/startup/server/logger';
import RegexWebUrl from '/imports/utils/regex-weburl';

const MSG_DIRECT_TYPE = 'DIRECT';
const NODE_USER = 'nodeJSapp';

const HTML_SAFE_MAP = {
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;',
};

export const parseMessage = (message) => {
let parsedMessage = message || '';
parsedMessage = parsedMessage.trim();

// Replace <br/> with \n\r
parsedMessage = parsedMessage.replace(/<br\s*[\\/]?>/gi, '\n\r');

// Sanitize. See: http://shebang.brandonmintern.com/foolproof-html-escaping-in-javascript/
parsedMessage = parsedMessage.replace(/[<>'"]/g, (c) => HTML_SAFE_MAP[c]);

// Replace flash links to flash valid ones
parsedMessage = parsedMessage.replace(RegexWebUrl, "<a href='event:$&'><u>$&</u></a>");

return parsedMessage;
};


export const spokeTimeoutHandles = {};
export const clearSpokeTimeout = (meetingId, userId) => {
if (spokeTimeoutHandles[`${meetingId}-${userId}`]) {
Expand Down
@@ -1,32 +1,9 @@
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import RedisPubSub from '/imports/startup/server/redis';
import RegexWebUrl from '/imports/utils/regex-weburl';
import { extractCredentials } from '/imports/api/common/server/helpers';
import Logger from '/imports/startup/server/logger';

const HTML_SAFE_MAP = {
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;',
};

const parseMessage = (message) => {
let parsedMessage = message || '';
parsedMessage = parsedMessage.trim();

// Replace <br/> with \n\r
parsedMessage = parsedMessage.replace(/<br\s*[\\/]?>/gi, '\n\r');

// Sanitize. See: http://shebang.brandonmintern.com/foolproof-html-escaping-in-javascript/
parsedMessage = parsedMessage.replace(/[<>'"]/g, (c) => HTML_SAFE_MAP[c]);

// Replace flash links to flash valid ones
parsedMessage = parsedMessage.replace(RegexWebUrl, "<a href='event:$&'><u>$&</u></a>");

return parsedMessage;
};
import { extractCredentials, parseMessage } from '/imports/api/common/server/helpers';
import Logger from '/imports/startup/server/logger';

export default function sendGroupChatMsg(chatId, message) {
const REDIS_CONFIG = Meteor.settings.private.redis;
Expand Down
Expand Up @@ -2,7 +2,7 @@ import { GroupChatMsg } from '/imports/api/group-chat-msg';
import GroupChat from '/imports/api/group-chat';
import Logger from '/imports/startup/server/logger';
import flat from 'flat';
import { parseMessage } from './addGroupChatMsg';
import { parseMessage } from '/imports/api/common/server/helpers';

export default async function addBulkGroupChatMsgs(msgs) {
if (!msgs.length) return;
Expand Down
Expand Up @@ -2,7 +2,7 @@ import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import RedisPubSub from '/imports/startup/server/redis';
import Logger from '/imports/startup/server/logger';
import { extractCredentials } from '/imports/api/common/server/helpers';
import { extractCredentials, parseMessage } from '/imports/api/common/server/helpers';

const REDIS_CONFIG = Meteor.settings.private.redis;
const CHANNEL = REDIS_CONFIG.channels.toAkkaApps;
Expand All @@ -16,8 +16,7 @@ export default function setGuestLobbyMessage(message) {

check(meetingId, String);
check(requesterUserId, String);

const payload = { message };
const payload = { message: parseMessage(message) };

Logger.info(`User=${requesterUserId} set guest lobby message to ${message}`);

Expand Down
Expand Up @@ -2,7 +2,8 @@ import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import RedisPubSub from '/imports/startup/server/redis';
import Logger from '/imports/startup/server/logger';
import { extractCredentials } from '/imports/api/common/server/helpers';
import { extractCredentials, parseMessage } from '/imports/api/common/server/helpers';


const REDIS_CONFIG = Meteor.settings.private.redis;
const CHANNEL = REDIS_CONFIG.channels.toAkkaApps;
Expand All @@ -17,7 +18,7 @@ export default function setPrivateGuestLobbyMessage(message, guestId) {
check(meetingId, String);
check(requesterUserId, String);

const payload = { guestId, message };
const payload = { guestId, message: parseMessage(message) };

Logger.info(`User=${requesterUserId} sent a private guest lobby message to guest user=${guestId}`);

Expand Down
Expand Up @@ -51,7 +51,7 @@ const propTypes = {

const defaultProps = {
shortcuts: '',
tabIndex: 0,
tabIndex: -1,
};

const ChatListItem = (props) => {
Expand Down
Expand Up @@ -3,12 +3,15 @@ import PropTypes from 'prop-types';
import { TransitionGroup, CSSTransition } from 'react-transition-group';
import CaptionsListItem from '/imports/ui/components/user-list/captions-list-item/component';
import { defineMessages, injectIntl } from 'react-intl';
import KEY_CODES from '/imports/utils/keyCodes';
import Styled from './styles';
import { findDOMNode } from 'react-dom';

const propTypes = {
ownedLocales: PropTypes.arrayOf(PropTypes.object).isRequired,
sidebarContentPanel: PropTypes.string.isRequired,
layoutContextDispatch: PropTypes.func.isRequired,
roving: PropTypes.func.isRequired,
};

const intlMessages = defineMessages({
Expand All @@ -19,13 +22,62 @@ const intlMessages = defineMessages({
});

class UserCaptions extends Component {
constructor() {
super();

this.state = {
selectedCaption: null,
};

this.activeCaptionRefs = [];

this.changeState = this.changeState.bind(this);
this.rove = this.rove.bind(this);
}

componentDidMount() {
if (this._captionsList) {
this._captionsList.addEventListener(
'keydown',
this.rove,
true,
);
}
}

componentDidUpdate(prevProps, prevState) {
const { selectedCaption } = this.state;
if (selectedCaption && selectedCaption !== prevState.selectedCaption) {
const { firstChild } = selectedCaption;
if (firstChild) firstChild.focus();
}
}

changeState(ref) {
this.setState({ selectedCaption: ref });
}

rove(event) {
const { roving } = this.props;
const { selectedCaption } = this.state;
const captionItemsRef = findDOMNode(this._captionItems);
if ([KEY_CODES.SPACE, KEY_CODES.ENTER].includes(event?.which)) {
selectedCaption?.firstChild?.click();
} else {
roving(event, this.changeState, captionItemsRef, selectedCaption);
}
event.stopPropagation();
}

renderCaptions() {
const {
ownedLocales,
sidebarContentPanel,
layoutContextDispatch,
} = this.props;

let index = -1;

return ownedLocales.map((ownedLocale) => (
<CSSTransition
classNames="transition"
Expand All @@ -36,7 +88,7 @@ class UserCaptions extends Component {
component="div"
key={ownedLocale.locale}
>
<Styled.ListTransition>
<Styled.ListTransition ref={(node) => { this.activeCaptionRefs[index += 1] = node; }}>
<CaptionsListItem
{...{
locale: ownedLocale.locale,
Expand Down Expand Up @@ -69,10 +121,10 @@ class UserCaptions extends Component {
<Styled.ScrollableList
role="tabpanel"
tabIndex={0}
ref={(ref) => { this._msgsList = ref; }}
ref={(ref) => { this._captionsList = ref; }}
>
<Styled.List>
<TransitionGroup ref={(ref) => { this._msgItems = ref; }}>
<TransitionGroup ref={(ref) => { this._captionItems = ref; }}>
{this.renderCaptions()}
</TransitionGroup>
</Styled.List>
Expand Down
@@ -1,15 +1,16 @@
import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import UserCaptionsItem from './component';
import Service from '/imports/ui/components/user-list/service';
import CaptionsService from '/imports/ui/components/captions/service';
import { layoutSelectInput, layoutDispatch } from '../../../layout/context';

const Container = (props) => {
const sidebarContent = layoutSelectInput((i) => i.sidebarContent);
const { sidebarContentPanel } = sidebarContent;
const layoutContextDispatch = layoutDispatch();

return <UserCaptionsItem {...{ sidebarContentPanel, layoutContextDispatch, ...props }} />;
const { roving } = Service;
return <UserCaptionsItem {...{ sidebarContentPanel, layoutContextDispatch, roving, ...props }} />;
};

export default withTracker(() => ({
Expand Down
Expand Up @@ -47,13 +47,13 @@ class UserMessages extends PureComponent {
this._msgsList.addEventListener(
'keydown',
this.rove,
true,
);
}
}

componentDidUpdate(prevProps, prevState) {
const { selectedChat } = this.state;

if (selectedChat && selectedChat !== prevState.selectedChat) {
const { firstChild } = selectedChat;
if (firstChild) firstChild.focus();
Expand Down Expand Up @@ -97,6 +97,7 @@ class UserMessages extends PureComponent {
const { selectedChat } = this.state;
const msgItemsRef = findDOMNode(this._msgItems);
roving(event, this.changeState, msgItemsRef, selectedChat);
event.stopPropagation();
}

render() {
Expand All @@ -120,7 +121,7 @@ class UserMessages extends PureComponent {
</Styled.Container>
<Styled.ScrollableList
role="tabpanel"
tabIndex={-1}
tabIndex={0}
ref={(ref) => { this._msgsList = ref; }}
>
<Styled.List>
Expand Down
7 changes: 4 additions & 3 deletions build/packages-template/bbb-etherpad/settings.json
Expand Up @@ -220,9 +220,10 @@
*/

/*
* The default text of a pad
*/
"defaultPadText" : "",
* The default text of a pad: A zero-width-space is used to work around an issue with Etherpad 1.9.1 where empty pads are not being created.
* See: https://github.com/ether/etherpad-lite/issues/5787
*/
"defaultPadText" : "\u200b",

/*
* Default Pad behavior.
Expand Down