Skip to content

Commit d1bf7f8

Browse files
committed
2 parents 18ace38 + 7519ce5 commit d1bf7f8

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

.github/workflows/build-linux.yml

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
libc: musl
2626
gcc_install: clang lld
2727
gcc: clang
28+
gxx: clang++
2829
# libc is intentionally not set here, as prebuild-install requires libc to not be set for glibc builds
2930
- triple: "linux-gnu"
3031
platform: debian
@@ -48,17 +49,20 @@ jobs:
4849
platform: debian
4950
gcc_install: gcc g++
5051
gcc: gcc
52+
gxx: g++
5153
- arch: arm64
5254
platform: debian
5355
gcc_install: gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
5456
gcc: aarch64-linux-gnu-gcc
57+
gxx: aarch64-linux-gnu-g++
5558
# debian uses the triple `arm-linux-gnueabihf` instead of alpine's `armv7-alpine-linux-musleabihf`
5659
# because of this, we explicitly override triple_arch for debian arm
5760
- triple_arch: arm
5861
arch: arm
5962
platform: debian
6063
gcc_install: gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
6164
gcc: arm-linux-gnueabihf-gcc
65+
gxx: arm-linux-gnueabihf-g++
6266

6367
steps:
6468
- uses: actions/checkout@v4

cmake/toolchain/ci.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(triple $ENV{TRIPLE})
33

44
# use clang and lld
55
set(CMAKE_C_COMPILER $ENV{GCC})
6-
set(CMAKE_CXX_COMPILER $ENV{GCC})
6+
set(CMAKE_CXX_COMPILER $ENV{GXX})
77
if (CMAKE_C_COMPILER MATCHES clang)
88
add_link_options("-fuse-ld=lld")
99
endif()

polyfill/RTCPeerConnection.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,18 @@ export default class _RTCPeerConnection extends EventTarget {
5555
if (config.iceServers[i].urls?.some((url) => url == ''))
5656
throw exceptions.SyntaxError('IceServers urls cannot be empty');
5757

58-
// urls should match the regex "stun\:\w*|turn\:\w*|turns\:\w*"
58+
// urls should be valid URLs and match the protocols "stun:|turn:|turns:"
5959
if (
6060
config.iceServers[i].urls?.some(
61-
(url) => !/^(stun:[\w,\.,:]*|turn:[\w,\.,:]*|turns:[\w,\.,:]*)$/.test(url),
61+
(url) => {
62+
try {
63+
const parsedURL = new URL(url)
64+
65+
return !/^(stun:|turn:|turns:)$/.test(parsedURL.protocol)
66+
} catch (error) {
67+
return true
68+
}
69+
},
6270
)
6371
)
6472
throw exceptions.SyntaxError('IceServers urls wrong format');

0 commit comments

Comments
 (0)