• Eric Wong's avatar
    storedPlaylist: prevent potential DoS from stored playlist commands · 29df7036
    Eric Wong authored
    While mpd has always protected against the infinite expansion of
    the main playlist by limiting its size in memory, however the
    new storedPlaylist code has never checked for this limit.
    
    Malicious (or clumsy) users could repeatedly append songs to
    stored playlists, causing files to grow increasingly large
    on disk.  Attempting to load extremely large files into memory
    will require mpd to slurp that all into memory, and ultimately
    the file would be unusable by mpd because of the configurable
    playlist size limit.
    
    Now we limit stored playlists to the max_playlist_length
    configuration variable set by the user (default is 16384).  We
    will refuse to append to playlist files if they hit that limit;
    and also refuse to load more than the specified amount of songs
    into memory.
    
    git-svn-id: https://svn.musicpd.org/mpd/trunk@7154 09075e82-0dd4-0310-85a5-a0d7c8717e4f
    29df7036
Name
Last commit
Last update
doc Loading commit data...
m4 Loading commit data...
scripts Loading commit data...
src Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
Makefile.am Loading commit data...
README Loading commit data...
TODO Loading commit data...
UPGRADING Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...