Commit Graph

38 Commits

Author SHA1 Message Date
Michael Jones
da332ed9e7
Add the InsertBraces command for clang-format to ensure that all conditionals always have braces (#1408)
- Why? Because code where conditionals lack braces is much harder to read, and prone to indentation confusion.
- How? Just added an extra flag to .clang-format and re-ran clang-format on all the files.

I also moved .clang-format up to the top level of the repo so that it can be applied to the fuzz targets as well.
2024-01-27 16:38:40 -08: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
r3g_5z
212e782355
use santisied psql string (#1144)
Noticed the plaintext password of my postgresql server in my coturn
logs, but postgresql errors would return the password sanitised. Simple
fix to log the sanitised string.


![image](https://user-images.githubusercontent.com/112147643/213053494-c8a5d226-0b04-4c8d-9b52-3e1330291a39.png)


Signed-off-by: r3g_5z <june@girlboss.ceo>

Signed-off-by: r3g_5z <june@girlboss.ceo>
2023-01-19 17:55:46 -08:00
Gustavo Garcia
d9108a4b54
Add clang format rules and checks (#935)
I would like to get feedback on this and see if people is confortable
with these clang rules.

Right now is using the "llvm" style increasing the line length from 80
to 120 given that coturn is using long lines often.

Co-authored-by: Pavel Punsky <eakraly@users.noreply.github.com>
2022-11-06 22:05:17 +01:00
Pavel Punsky
af9bc12055
Sanitize DB connection string before printing to log (#1020)
Store sanitized version of DB connection string with password masked
(replace all chars with * which exposes its length)
Use sanitized version when logging connection string

Fixes #1017 and #272
2022-10-17 08:44:30 +02:00
Mészáros Mihály
50ebef7a3f Fix g++ 2 errors and many warnings
Resolves #661 #654
2021-01-05 21:47:50 +00:00
Shu Muto
dac67ea046 Disconnect database gracefully
Coturn does not disconnect database properly when shutdown.
This behavior causes accumulation of sockets for database with TIME_WAIT.
Especially, `turnadmin` is recommended to manage userdb,
but use of `turnadmin` from other application or scripts
can run out of socket resource due to above problem.

This patch adds database disconnection when shutdown
for both of `turnserver` and `turnadmin`.

Fixes #366
2019-03-18 15:33:21 +09:00
Bradley T. Hughes
d2ee3ac291 Remove [su]{08,16,32,64}bits type defines
Do not overload the standard types with #defines, just use them
directly.
2019-03-08 09:08:30 +01:00
Bradley T. Hughes
043b102e38 Remove turn_strdup()
Do not overload strdup() from string.h
2019-03-07 08:00:08 +01:00
Bradley T. Hughes
b50fc77124 Remote turn_free()
Do not overload free() with a different API.
2019-03-07 07:58:12 +01:00
Bradley T. Hughes
ed91d4bc17 Remove turn_free_simple
Do not overload free() from stdlib.h
2019-03-06 23:34:25 +01:00
Oleg Moskalenko
dbc9dee42b working on multi-tenant server based upon oauth 2015-09-14 00:16:13 -07:00
mom040267
153b2d1d41 fixing a security hole 2015-06-28 05:37:28 +00:00
mom040267
6dbee00b74 working on new third-party auth draft 2015-04-19 07:37:12 +00:00
mom040267
86f40b4bd9 working on third-party auth 2015-04-19 06:18:28 +00:00
mom040267
4424b3c92a --sha256, --sha384, --sha512 parameters retired. 2015-04-11 07:26:55 +00:00
mom040267
61239f9aa8 bandwidth limit is 64 bits now 2015-03-02 01:44:29 +00:00
mom040267
425547b774 warnings fixed 2015-01-24 18:48:19 +00:00
mom040267
da0f380b18 cosmetics 2015-01-24 10:43:56 +00:00
mom040267
4e8b95bbb0 c++ compilation errors fixed 2015-01-24 08:21:32 +00:00
mom040267
7c2fc1b1b6 oauth timestamps added 2015-01-23 07:12:04 +00:00
mom040267
aefe2608d0 oauth keys page 2015-01-22 10:03:40 +00:00
mom040267
01e1316c49 black/white lists page 2015-01-20 08:55:28 +00:00
mom040267
55d116f7fe origins admin page 2015-01-19 08:00:47 +00:00
mom040267
9bd8f29ac8 shared secrets admin page and fixes 2015-01-19 06:15:06 +00:00
mom040267
e3d9f5484c list users 2015-01-18 05:48:34 +00:00
mom040267
f562b9cfa7 admin user administration commands 2015-01-11 09:50:52 +00:00
mom040267
237b3baaa7 short-term credentials removed in the TURN server 2015-01-11 06:28:58 +00:00
mom040267
5cd0d33c31 1) working on https; 2) SSLv2 support removed. 2015-01-10 08:25:29 +00:00
mom040267
c3da54c292 multiple auth threads 2014-12-21 03:16:02 +00:00
mom040267
6b291a8238 multi-threaded DB connections. 2014-12-20 08:51:44 +00:00
mom040267
13b8ac9e74 working on per-realm white/black lists 2014-10-27 01:22:33 +00:00
mom040267
5b300733dc working on per-realm white/black lists 2014-10-26 07:45:28 +00:00
mom040267
04f354d563 memory cleaning 2014-10-11 06:49:35 +00:00
mom040267
31089e909c db operations fixed 2014-09-01 18:51:37 +00:00
mom040267
268de3e3d1 working on oauth 2014-08-27 07:19:48 +00:00
mom040267
541736ebed users list improved 2014-07-13 06:15:15 +00:00
mom040267
5c3b773d9c MongoDB support: initial checkin 2014-07-11 07:06:05 +00:00