Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
murat-dogan committed Sep 14, 2024
2 parents 18ace38 + 7519ce5 commit d1bf7f8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
libc: musl
gcc_install: clang lld
gcc: clang
gxx: clang++
# libc is intentionally not set here, as prebuild-install requires libc to not be set for glibc builds
- triple: "linux-gnu"
platform: debian
Expand All @@ -48,17 +49,20 @@ jobs:
platform: debian
gcc_install: gcc g++
gcc: gcc
gxx: g++
- arch: arm64
platform: debian
gcc_install: gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
gcc: aarch64-linux-gnu-gcc
gxx: aarch64-linux-gnu-g++
# debian uses the triple `arm-linux-gnueabihf` instead of alpine's `armv7-alpine-linux-musleabihf`
# because of this, we explicitly override triple_arch for debian arm
- triple_arch: arm
arch: arm
platform: debian
gcc_install: gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
gcc: arm-linux-gnueabihf-gcc
gxx: arm-linux-gnueabihf-g++

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion cmake/toolchain/ci.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(triple $ENV{TRIPLE})

# use clang and lld
set(CMAKE_C_COMPILER $ENV{GCC})
set(CMAKE_CXX_COMPILER $ENV{GCC})
set(CMAKE_CXX_COMPILER $ENV{GXX})
if (CMAKE_C_COMPILER MATCHES clang)
add_link_options("-fuse-ld=lld")
endif()
Expand Down
12 changes: 10 additions & 2 deletions polyfill/RTCPeerConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,18 @@ export default class _RTCPeerConnection extends EventTarget {
if (config.iceServers[i].urls?.some((url) => url == ''))
throw exceptions.SyntaxError('IceServers urls cannot be empty');

// urls should match the regex "stun\:\w*|turn\:\w*|turns\:\w*"
// urls should be valid URLs and match the protocols "stun:|turn:|turns:"
if (
config.iceServers[i].urls?.some(
(url) => !/^(stun:[\w,\.,:]*|turn:[\w,\.,:]*|turns:[\w,\.,:]*)$/.test(url),
(url) => {
try {
const parsedURL = new URL(url)

return !/^(stun:|turn:|turns:)$/.test(parsedURL.protocol)
} catch (error) {
return true
}
},
)
)
throw exceptions.SyntaxError('IceServers urls wrong format');
Expand Down

0 comments on commit d1bf7f8

Please sign in to comment.