Commit Graph

1607 Commits

Author SHA1 Message Date
Evgeny Khramtsov
7ecfb537e9
Only set MHD_USE_DUAL_STACK if IPv6 is available (#1362)
Co-authored-by: Evgeny Khramtsov <evgeny.khramtsov@ringcentral.com>

If IPv6 is not enabled during runtime, prometheus server fails to start with `EAFNOSUPPORT` because `MHD_USE_DUAL_STACK` is set unconditionally.

This PR fixes it. As a bonus, it also checks if libmicrohttpd is compiled with IPv6 support.
2024-01-14 12:49:59 -08:00
Pavel Punsky
9e7f31a84d
Remove unimplemented test folder reference from CMakeLists.txt (#1371) 2024-01-14 12:49:05 -08:00
tyranron
131ada68e6
Update Debian "bookworm" to 20240110 snapshot in Docker image 2024-01-11 12:24:29 +01:00
tyranron
d11451b902
Update Debian "bookworm" to 20231218 snapshot in Docker image 2023-12-19 13:37:11 +01:00
dependabot[bot]
1c7171b74a
Upgrade github/codeql-action from 2 to 3 version (#1348)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 13:27:53 +01:00
dependabot[bot]
4134344838
Upgrade actions/download-artifact from 3 to 4 version (#1350)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 12:48:28 +01:00
dependabot[bot]
a437bcbc12
Upgrade actions/upload-artifact from 3 to 4 version (#1349)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 12:17:41 +01:00
tyranron
7dc52de6c3
Upgrade Alpine to 3.19 version in Docker image 2023-12-08 13:20:35 +01:00
tyranron
e0a040caac
Update Alpine to 3.18.5 version to fix CVE-2023-5678 in Docker image 2023-12-01 13:21:55 +01:00
Kang Lin
294f897ccd
CMake: find prometheus(fix #1304) (#1315)
fix #1304
2023-11-22 20:34:53 -08:00
Kang Lin
c7a18c6296
Fix: run cmake.yml in any github action (#1320) 2023-11-22 20:34:13 -08:00
Subhra264
9485c9567e
Fix: Return correct error code for create_relay_connection in case of RESERVATION-TOKEN failure (#1319)
Fixes #1266 

According to RFC 5766, [section 6.2](https://www.rfc-editor.org/rfc/rfc5766#section-6.2) point no. 5, the turn server needs to reject the request with 508 (Insufficient Capacity) error code when the given RESERVATION-TOKEN is not valid.
2023-11-22 20:30:27 -08:00
tyranron
4353f05021
Update Debian "bookworm" to 20231120 snapshot in Docker image 2023-11-21 13:29:05 +01:00
dependabot[bot]
0a95c8435a
Upgrade actions/github-script from 6 to 7 version (#1316)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 14:37:05 +01:00
Pavel Punsky
99cc8aaa65
Reduce ifdefs in code: TURN_NO_PROMETHEUS (#1116)
TURN_NO_PROMETHEUS define is used in minimal amount of places now
2023-11-05 17:49:03 -08:00
Richard Russo
4bc872b663
strncpy doesn't return size_t (#1296)
follow up to https://github.com/coturn/coturn/pull/1282/files
2023-11-05 17:48:32 -08:00
Dave Lambley
20c8d86a34
Return a 400 response to HTTP requests (#1231)
For our deployment, it is useful if coturn returns a valid HTTP response to an HTTP request. To do this on the same port as STUN/TURN and without enabling the admin site, I have extended `read_client_connection()` to return a canned HTTP response, in response to an HTTP request, rather than immediately closing the connection.
2023-11-05 17:25:12 -08:00
tyranron
0fb6addecb
Update Debian "bookworm" to 20231030 snapshot in Docker image 2023-11-01 12:19:46 +02:00
tyranron
e7c1551de1
Try test s390x platform Docker images in MacOS on CI 2023-10-05 14:25:26 +03:00
tyranron
66bea108a1
Try 6.1.0 QEMU version for Docker tests on CI 2023-10-05 13:21:34 +03:00
tyranron
078bc829bd
Try edge QEMU version for Docker tests on CI 2023-10-05 13:03:07 +03:00
tyranron
a68c57caac
Try BuildKit QEMU auto-emulation on CI for Docker images 2023-10-05 12:45:25 +03:00
Gustavo Garcia
597b36c5a2
Fix missing strncpy in fix_stun_check_message_integrity_str (#1282)
Co-authored-by: Gustavo Garcia <gustavogb@mail.com>
Co-authored-by: Pavel Punsky <eakraly@users.noreply.github.com>
2023-10-04 10:06:40 -07:00
tyranron
213ecd3388
Try build s390x platform Docker images in MacOS on CI 2023-10-04 16:58:52 +03:00
tyranron
c03096ee7b
Update Alpine to 3.18.4 version and Debian "bookworm" to 20230919 snapshot in Docker image 2023-10-04 14:04:56 +03:00
Gustavo Garcia
4ddca0b0b9
Fix ubuntu 16 build with GH action checkout version to v3 (#1281)
Co-authored-by: Gustavo Garcia <gustavogb@mail.com>
2023-10-03 20:44:31 -07:00
Pavel Punsky
95c2967252
Fix memleak in pgsql_reread_realms (#1278)
Fixes #1259

If `ur_string_map_put ` fails then the string that was just `strdup`-ed
will leak memory
Now the return value is checked and memory free-ed in case of failure
2023-10-02 16:20:14 +02:00
Gustavo Garcia
88ced47138
Replace srand/rand with srandom/random (#1279)
- srandom/random provide stronger randomness characteristics than
srand/rand in some operating systems.
- usage of srand/rand is not very consistent in coturn.

There is room for more refactoring and use apputils helper functions in
ns_turn_msg.c too but i'm not sure that dependency from "client" module
to "apps" module is a good idea yet.

Thx @0xdea

Co-authored-by: Gustavo Garcia <gustavogb@mail.com>
2023-10-02 16:19:57 +02:00
Gustavo Garcia
4e0d21e1b5
Fix memcpy len checks stun_is_challenge_response_str (#1280)
Add missing checks for length of realm/nonce/server_name before copying
those values to the buffer passed to stun_is_challenge_response_str.

The function stun_is_challenge_response_str is only used in uclient test
application.

Thank you very much @0xdea

Co-authored-by: Gustavo Garcia <gustavogb@mail.com>
2023-10-02 16:19:38 +02:00
dependabot[bot]
17e3b81a36
Upgrade docker/setup-qemu-action to 3 version (#1265)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 14:43:53 +02:00
dependabot[bot]
70f93468ad
Upgrade docker/setup-buildx-action to 3 version (#1264)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 14:13:17 +02:00
dependabot[bot]
05845b1c22
Upgrade docker/login-action to 3 version (#1263)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 12:51:34 +02:00
dependabot[bot]
ea96379905
Upgrade actions/checkout to 4 version (#1261)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 14:14:40 +02:00
Alexander Udovichenko
2a695ea855
Add warning and disable web admin if no-tls option used (#1256)
Fixes https://github.com/coturn/coturn/issues/1239

https to web ui freeze in browser if no_tls option used, because no tls
stuff initialized.
This PR add warning about this and comment aboute this in default config
2023-08-27 16:27:37 -07:00
Pavel Punsky
2850550be1
Fix formatting to fix lint error (#1258) 2023-08-27 16:26:37 -07:00
czephyr
19744a4a39
added warnings for prometheus apt unavailability (#1184)
added some warnings that the prometheus implementation is unavailable
when installing through apt
coturn/coturn#1133
2023-08-20 13:17:37 -07:00
Kang Lin
c0cb48d4a2
Update version in vcpkg.json (#1254)
Please update version in vcpkg.json, when tag
2023-08-17 18:56:42 -07:00
Aaron Bird
0f450f5492
Fix error of make command in Cygwin environment (#1236)
Environment:
- Windows 10
- Cygwin 2.925

make output:
```
<command-line>: note: this is the location of the previous definition
src/apps/common/ns_turn_utils.c:53:10: fatal error: sys/syscall.h: No such file or directory
   53 | #include <sys/syscall.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
In file included from src/client/ns_turn_ioaddr.h:34,
                 from src/client/ns_turn_msg.h:34,
                 from src/apps/common/stun_buffer.h:34,
                 from src/apps/common/stun_buffer.c:31:
src/ns_turn_defs.h:223: warning: "TURN_NO_SCTP" redefined
  223 | #define TURN_NO_SCTP
      |
<command-line>: note: this is the location of the previous definition
make: *** [Makefile:127: bin/turnutils_oauth] Error 1
```
2023-08-13 17:14:16 -07:00
Cybermilitia
72cf9ba52b
Fix recursive call in delete alternate server (#1250)
I tested the code part by using manual and automated tools for more than
2 years.

Fixes #823 

When you try to delete an alternate server in the list by using "das :" command on the CLI, the session gets stuck and can't response although alternate server is removed.

The problem appears to be related to calling del_alt_server function in the same function recursively.

Co-authored-by: CUMHUR KARAHAN <cumhur.karahan@turkcell.com.tr>
2023-08-13 16:38:19 -07:00
Jorge
0924770181
Add CodeQL workflow (#1228)
Hello from [GitHub Security Lab](https://securitylab.github.com/)!

Your repository is critical to the security of the Open Source Software
(OSS) ecosystem and as part of our mission to make OSS safer, we are
contributing a [CodeQL configuration for code
scanning](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning-for-a-repository#setting-up-code-scanning-manually)
to your repository. By enabling code scanning with CodeQL, you will be
able to continuously analyze your code and surface potential
vulnerabilities [before they can even reach your
codebase](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests#about-code-scanning-results-on-pull-requests).
In fact, you may have seen some alerts already appearing on this pull
request!

We’ve tested the configuration manually before opening this pull request
and adjusted it to the needs of your particular repository, but feel
free to tweak it further! Check [this
page](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#editing-a-code-scanning-workflow) for
detailed documentation.

Questions? Check out the FAQ below!

### FAQ
<details>
<summary>Click here to expand the FAQ section</summary>

#### How often will the code scanning analysis run?
By default, code scanning will trigger a scan with the CodeQL engine on
the following events:
* On every pull request — to flag up potential security problems for you
to investigate before merging a PR.
* On every push to your default branch and other protected branches —
this keeps the analysis results on your repository’s *Security* tab up
to date.
* Once a week at a fixed time — to make sure you benefit from the latest
updated security analysis even when no code was committed or PRs were
opened.

#### What will this cost?
Nothing! The CodeQL engine will run inside GitHub Actions, making use of
your [unlimited free compute minutes for public
repositories](https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#about-billing-for-github-actions).

#### Where can I see the results of the analysis?
The results of the analysis will be available on the *Security* tab of
your repository. You can find more information about the results
[here](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository).

#### What types of problems does CodeQL find?
By default, code scanning runs the [`default` query
suite](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/built-in-codeql-query-suites#default-query-suite).

#### How do I upgrade my CodeQL engine?
No need! New versions of the CodeQL analysis are constantly deployed on
GitHub.com; your repository will automatically benefit from the most
recently released version.

#### The analysis doesn’t seem to be working
If you get an error in GitHub Actions that indicates that CodeQL wasn’t
able to analyze your code, please [follow the instructions
here](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow)
to debug the analysis.

#### Which source code hosting platforms does code scanning support?
GitHub code scanning is deeply integrated within GitHub itself. If you’d
like to scan source code that is hosted elsewhere, we suggest that you
create a mirror of that code on GitHub.

</details>
2023-08-10 20:20:16 -07:00
tyranron
d7db17f048
Fix redundant Docker image tags with major OS version (#1230, #1226) 2023-07-05 12:27:59 +03:00
tyranron
6bb9109b93
Bump up Docker image revision number 2023-07-04 15:17:53 +03:00
Kai Ren
c484eab8b1
Improve Docker image tagging with major OS version (#1230, #1226)
Additionally:
- update Debian "bookworm" to 20230703 snapshot in Docker image
2023-07-04 15:16:01 +03:00
tyranron
8b802f9a5e
Update Alpine to 3.18.2 version to fix CVE-2023-1255 and CVE-2023-2650 in Docker image 2023-06-15 13:20:22 +02:00
tyranron
f908c65a06
Upgrade Debian to "bookworm" in Docker image 2023-06-13 16:41:35 +02:00
Robert Scheck
8f9446cf8f
Change printf() to TURN_LOG_FUNC() for --no-stdout-log (#1221) 2023-06-01 19:38:33 -07:00
rim
7bc932a905
Fix build with libressl 3.6+ (#1198)
Tested on FreeBSD 13/stable
2023-05-14 16:38:58 -07:00
tyranron
d526e7afcc
Upgrade Alpine to 3.17 version and Debian "bullseye" to 20230502 snapshot in Docker image 2023-05-10 17:19:21 +02:00
Mathieu Aubin
4ba2f69ba3
Update turnserver.spec (#1192) 2023-04-23 13:51:31 -07:00
tyranron
730b328660
Fix Docker tests for 4.6.2 Coturn 2023-04-12 14:59:07 +03:00