Commit a476d529 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

rtpmanager: don't reveal the user's username, hostname or real name by default

Send a randomly made-up user@hostname as CNAME and don't
send a NAME at all by default.

https://bugzilla.gnome.org/show_bug.cgi?id=668320
parent a224ffb9
......@@ -1883,7 +1883,7 @@ gst_rtp_bin_class_init (GstRtpBinClass * klass)
static void
gst_rtp_bin_init (GstRtpBin * rtpbin, GstRtpBinClass * klass)
{
gchar *str;
gchar *cname;
rtpbin->priv = GST_RTP_BIN_GET_PRIVATE (rtpbin);
rtpbin->priv->bin_lock = g_mutex_new ();
......@@ -1901,12 +1901,10 @@ gst_rtp_bin_init (GstRtpBin * rtpbin, GstRtpBinClass * klass)
rtpbin->use_pipeline_clock = DEFAULT_USE_PIPELINE_CLOCK;
/* some default SDES entries */
str = g_strdup_printf ("%s@%s", g_get_user_name (), g_get_host_name ());
cname = g_strdup_printf ("user%u@x-%u.net", g_random_int (), g_random_int ());
rtpbin->sdes = gst_structure_new ("application/x-rtp-source-sdes",
"cname", G_TYPE_STRING, str,
"name", G_TYPE_STRING, g_get_real_name (),
"tool", G_TYPE_STRING, "GStreamer", NULL);
g_free (str);
"cname", G_TYPE_STRING, cname, "tool", G_TYPE_STRING, "GStreamer", NULL);
g_free (cname);
}
static void
......
......@@ -556,12 +556,19 @@ rtp_session_init (RTPSession * sess)
sess->mtu = DEFAULT_RTCP_MTU;
/* some default SDES entries */
str = g_strdup_printf ("%s@%s", g_get_user_name (), g_get_host_name ());
/* we do not want to leak details like the username or hostname here */
str = g_strdup_printf ("user%u@x-%u.net", g_random_int (), g_random_int ());
rtp_source_set_sdes_string (sess->source, GST_RTCP_SDES_CNAME, str);
g_free (str);
rtp_source_set_sdes_string (sess->source, GST_RTCP_SDES_NAME,
g_get_real_name ());
#if 0
/* we do not want to leak the user's real name here */
str = g_strdup_printf ("Anon%u", g_random_int ());
rtp_source_set_sdes_string (sess->source, GST_RTCP_SDES_NAME, str);
g_free (str);
#endif
rtp_source_set_sdes_string (sess->source, GST_RTCP_SDES_TOOL, "GStreamer");
sess->first_rtcp = TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment