Commit Graph

7 Commits

Author SHA1 Message Date
Max Kellermann
f291876772 mapper: check for "." and ".."
Make map_directory_child_fs() refuse the names "." and "..".  This is
currently the interface where an attacker may inject a manipulated
path (through the "update" command).
2008-10-31 16:48:58 +01:00
Max Kellermann
d8e877e335 path: moved playlist_dir to mapper.c
Added the function map_spl_utf8_to_fs() which replaces
utf8_to_fs_playlist_path().
2008-10-31 16:47:14 +01:00
Max Kellermann
ef54271619 mapper: use g_warning() for logging
g_error() is fatal by default.  Use g_warning() for non-fatal
initialization errors.
2008-10-31 16:46:46 +01:00
Max Kellermann
57f5e8731d mapper: don't return database path with leading slash
Due to an off-by-one bug in map_fs_to_utf8(), the function returned
database paths with a leading slash.
2008-10-19 00:05:39 +02:00
Max Kellermann
8c0060fae4 playlist: added support for adding songs not in the music database
Clients which have authenticated via unix socket may add local files
to the MPD playlist, provided that they own the file.
2008-10-15 22:35:13 +02:00
Max Kellermann
7366191f0d mapper: moved musicDir initialization from path.c
Moved the musicDir variable and its initialization code from path.c to
mapper.c.
2008-10-15 19:36:33 +02:00
Max Kellermann
5b71d5f6f7 mapper: new song-to-filesystem mapper library
The mapper library maps directory and song objects to file system
paths.  With this central library, the code mixture in path.c should
be cleaned up, and we will be able to add neat features like aliasing.
2008-10-14 11:10:49 +02:00