From 8c096fd5298930e41959966fbdbac333b9d868e1 Mon Sep 17 00:00:00 2001 From: Mike Sheldon Date: Sun, 6 Apr 2014 13:16:32 +0100 Subject: [PATCH] Handle protocol-free urls in radio handshake base url --- nixtape/radio/handshake.php | 1 + 1 file changed, 1 insertion(+) diff --git a/nixtape/radio/handshake.php b/nixtape/radio/handshake.php index 0f8ce24d..13eca413 100644 --- a/nixtape/radio/handshake.php +++ b/nixtape/radio/handshake.php @@ -39,6 +39,7 @@ $adodb->Execute('DELETE FROM Radio_Sessions WHERE expires < ' . (int)(time())); $adodb->Execute('INSERT INTO Radio_Sessions (username, session, expires) VALUES ( ' . $adodb->qstr($username) . ', ' . $adodb->qstr($session) . ', ' . (int)(time() + 259200) . ')'); $radio_base = preg_replace('/https?:\/\//i', '', $base_url, 1); +$radio_base = preg_replace('/^\/\//', '', $radio_base, 1); echo 'session=' . $session . "\n"; echo "stream_url=this.is.broken.{$username}.example.com\n"; -- GitLab