diff options
author | Joey Hess <joeyh@joeyh.name> | 2014-12-11 20:08:49 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2014-12-11 20:08:49 -0400 |
commit | 892eac7f77f0e54fc8003ca9e306a76d59ebc519 (patch) | |
tree | b2a5e59b98769e8e9a0945ae947d69ae1657004a /Command/AddUrl.hs | |
parent | fe0fdf3b49840c19f0c2294fd958e5ed6448a827 (diff) |
sanitize filepaths provided by checkUrl
Diffstat (limited to 'Command/AddUrl.hs')
-rw-r--r-- | Command/AddUrl.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs index 22e996a15..825d9bdbf 100644 --- a/Command/AddUrl.hs +++ b/Command/AddUrl.hs @@ -73,11 +73,11 @@ seek us = do next $ next $ return False Right (UrlContents sz mf) -> do void $ commandAction $ - startRemote r relaxed (fromMaybe deffile mf) u sz + startRemote r relaxed (maybe deffile fromSafeFilePath mf) u sz Right (UrlMulti l) -> forM_ l $ \(u', sz, f) -> void $ commandAction $ - startRemote r relaxed (deffile </> f) u' sz + startRemote r relaxed (deffile </> fromSafeFilePath f) u' sz startRemote :: Remote -> Bool -> FilePath -> URLString -> Maybe Integer -> CommandStart startRemote r relaxed file uri sz = do |