diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-06-02 01:26:15 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-06-02 01:26:15 +0000 |
commit | efe8a04c70f1dde3c62e88f514433515631db858 (patch) | |
tree | d6ba8eb0acd4a299149596718cd4bfb6224f20f1 /src/playlist.c | |
parent | bef55ff3de4a16100b8115950c10f3cede755d3c (diff) | |
download | mpd-efe8a04c70f1dde3c62e88f514433515631db858.tar.gz mpd-efe8a04c70f1dde3c62e88f514433515631db858.tar.xz mpd-efe8a04c70f1dde3c62e88f514433515631db858.zip |
validate url's before adding to playlist
git-svn-id: https://svn.musicpd.org/mpd/trunk@1289 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/playlist.c')
-rw-r--r-- | src/playlist.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/playlist.c b/src/playlist.c index ba5b5150c..cb9314661 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -471,10 +471,13 @@ int addToPlaylist(FILE * fp, char * url) { if((song = getSongFromDB(url))) { } - else if(isRemoteUrl(url) && (song = newSong(url,SONG_TYPE_URL))) { + else if(isValidRemoteUtf8Url(url) && + (song = newSong(url,SONG_TYPE_URL))) + { } else { - myfprintf(fp,"%s \"%s\" is not in the music db\n", + myfprintf(fp,"%s \"%s\" is not in the music db or is" + "not a valid url\n", COMMAND_RESPOND_ERROR,url); return -1; } |