Skip to content

Commit

Permalink
Remove null bytes from uploaded song file names. Closes #162.
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyw committed May 22, 2012
1 parent 7c6a888 commit 83d0ee0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/api/system.rb
Expand Up @@ -31,7 +31,7 @@ class App < Sinatra::Base
post '/upload' do
params[:files].each do |file|
tmpfile = file[:tempfile]
name = file[:filename].chomp
name = file[:filename].chomp.delete("\000")

file_with_name = File.join("/tmp", name)
system "mv", tmpfile.path, file_with_name
Expand Down

0 comments on commit 83d0ee0

Please sign in to comment.