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

114 support for bbb v26 #115

Merged
merged 11 commits into from
Sep 28, 2023
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# ChangeLog

## 3.1.0 - 2023-06-29

Changes:
- add new BBB 2.6 API parameters
- notifyRecordingIsOn
- prsentationUploadExternalUrl
- prsentationUploadExternalDescription
- recordFullDurationMedia (v2.6.9)
- disabledFeaturesExclude(2.6.9)
- userdata-bbb_hide_presentation_on_join
- move configuration of checksum hash function from `ClusterGroups` to `Clusters`
- bump dependencies
PhilippKilian marked this conversation as resolved.
Show resolved Hide resolved

PhilippKilian marked this conversation as resolved.
Show resolved Hide resolved
## 3.0.7 - 2023-06-02

Fixes:
Expand Down
18 changes: 9 additions & 9 deletions b3lb/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# b3lb v3.1 - Delay update to Django 4.x because of dependencies
Django==3.2.18
Django==3.2.19
PyGObject==3.44.1
aiohttp==3.8.4
boto3==1.26.119
django-extensions==3.2.1
celery==5.2.7
boto3==1.26.163
django-extensions==3.2.3
celery==5.3.1
celery-singleton==0.3.1
django-cacheops==7.0
django-cacheops==7.0.1
django-db-file-storage==0.5.5
django-celery-admin==0.1
django-celery-beat==2.5.0
django-celery-results==2.5.0
django-celery-results==2.5.1
django-environ==0.10.0
django-redis==5.2.0
django-redis==5.3.0
django-storages==1.13.2
intervaltree==3.1.0
psycopg2cffi==2.9.0
requests==2.28.2
uvicorn[standard]==0.21.1
requests==2.31.0
uvicorn[standard]==0.22.0
xmltodict==0.13.0
42 changes: 42 additions & 0 deletions b3lb/rest/b3lb/contants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
from django.conf import settings
from hashlib import sha1, sha256, sha384, sha512
from _hashlib import HASH
from re import compile, escape
from typing import Any, Dict

#
# CONSTANTS
#
API_MATE_CHAR_POOL = 'abcdefghijklmnopqrstuvwxyz0123456789'
CONTENT_TYPE = "text/xml"
HOST_REGEX = compile(r'([^:]+)(:\d+)?$')
MEETING_ID_LENGTH = 100
MEETING_NAME_LENGTH = 500
NONCE_CHAR_POOL = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@*(-_)'
NONCE_LENGTH = 64
RECORD_PROFILE_DESCRIPTION_LENGTH = 255
RETURN_STRING_VERSION = '<response>\r\n<returncode>SUCCESS</returncode>\r\n<version>2.0</version>\r\n<apiVersion>2.0</apiVersion>\r\n<bbbVersion/>\r\n</response>'
RETURN_STRING_CREATE_LIMIT_REACHED = '<response>\r\n<returncode>FAILED</returncode>\r\n<message>Meeting/Attendee limit reached.</message>\r\n</response>'
RETURN_STRING_CREATE_NO_NODE_AVAILABE = '<response>\r\n<returncode>FAILED</returncode>\r\n<message>No Node available.</message>\r\n</response>'
RETURN_STRING_IS_MEETING_RUNNING_FALSE = '<response>\r\n<returncode>SUCCESS</returncode>\r\n<running>false</running>\r\n</response>'
RETURN_STRING_GET_MEETING_INFO_FALSE = '<response>\r\n<returncode>FAILED</returncode>\r\n<messageKey>notFound</messageKey>\r\n<message>A meeting with that ID does not exist</message>\r\n</response>'
RETURN_STRING_GET_MEETINGS_NO_MEETINGS = '<response>\r\n<returncode>SUCCESS</returncode>\r\n<meetings/>\r\n<messageKey>noMeetings</messageKey>\r\n<message>no meetings were found on this server</message>\r\n</response>'
RETURN_STRING_GET_RECORDING_TEXT_TRACKS_NOTHING_FOUND_JSON = '{"response":{"returncode":"FAILED","messageKey":"noRecordings","message":"No recording found"}}'
RETURN_STRING_GET_RECORDING_NO_RECORDINGS = '<response>\r\n<returncode>SUCCESS</returncode>\r\n<recordings></recordings>\r\n<messageKey>noRecordings</messageKey>\r\n<message>There are no recordings for the meeting(s).</message>\r\n</response>'
RETURN_STRING_MISSING_MEETING_ID = '<response>\r\n<returncode>FAILED</returncode>\r\n<messageKey>missingParamMeetingID</messageKey>\r\n<message>You must specify a meeting ID for the meeting.</message>\r\n</response>'
RETURN_STRING_MISSING_RECORD_ID = '<response>\r\n<returncode>FAILED</returncode>\r\n<messageKey>missingParamRecordID</messageKey>\r\n<message>You must specify one or more a record IDs.</message>\r\n</response>'
RETURN_STRING_MISSING_RECORD_PUBLISH = '<response>\r\n<returncode>FAILED</returncode>\r\n<messageKey>missingParamPublish</messageKey>\r\n<message>You must specify one a publish value true or false.</message>\r\n</response>'
RETURN_STRING_RECORD_PUBLISHED = '<response>\r\n<returncode>SUCCESS</returncode>\r\n<published>{}</published>\r\n</response>'
RETURN_STRING_RECORD_DELETED = '<response>\r\n<returncode>SUCCESS</returncode>\r\n<deleted>true</deleted>\r\n</response>'
RETURN_STRING_RECORD_UPDATED = '<response>\r\n<returncode>SUCCESS</returncode>\r\n<updated>true</updated>\r\n</response>'
SHA1 = "sha1"
SHA256 = "sha256"
SHA384 = "sha384"
SHA512 = "sha512"
SHA_BY_STRING: Dict[str, HASH] = {SHA1: sha1, SHA256: sha256, SHA384: sha384, SHA512: sha512}
SHA_ALGORITHMS: Dict[Any, HASH] = {}
for desc, length, algorithm in [(SHA1, 40, sha1), (SHA256, 64, sha256), (SHA384, 96, sha384), (SHA512, 128, sha512)]:
if desc in settings.B3LB_ALLOWED_SHA_ALGORITHMS:
SHA_ALGORITHMS[length] = algorithm
SHA_ALGORITHMS[desc] = algorithm
SLUG_REGEX = compile(r'^([a-z]{2,10})(-(\d{3}))?\.' + escape(settings.B3LB_API_BASE_DOMAIN) + '$')
5 changes: 5 additions & 0 deletions b3lb/rest/b3lb/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.

# This utils file contains functions without import of b3lb files to prevent circular imports
from _hashlib import HASH
from xml.sax.saxutils import escape


def get_checksum(sha: HASH, url_string: str) -> str:
sha.update(url_string.encode())
return sha.hexdigest()

def xml_escape(string: str) -> str:
if isinstance(string, str):
return escape(string)
Expand Down
Loading
Loading