-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
This is broken somehow (token removed).
Started POST "/api/v1/debfiles/upload/***" for 10.0.60.90 at 2015-12-21 11:31:26 +1300
Cannot render console from 10.0.60.90! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Processing by Api::V1::DebfilesController#upload as */*
Parameters: {"debfile"=>#<ActionDispatch::Http::UploadedFile:0x007f1c6232eaf8 @tempfile=#<Tempfile:/tmp/RackMultipart20151221-20521-1xiaif3.deb>, @original_filename="influxdb_0.9.4_armhf.deb", @content_type="application/octet-stream", @headers="Content-Disposition: form-data; name=\"debfile\"; filename=\"influxdb_0.9.4_armhf.deb\"\r\nContent-Type: application/octet-stream\r\n">, "token"=>"***"}
Can't verify CSRF token authenticity
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."token" = ? LIMIT 1 [["token", "***"]]
Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)
NoMethodError (undefined method `original_filename' for nil:NilClass):
app/controllers/api/v1/debfiles_controller.rb:12:in `upload'
Don't why that is suddenly nil, was working when I tested it before:
def upload
current_user = User.find_by_token(params[:token]) or raise Errors::AccessDenied
log = Logger.new Rails.root.join('log', 'uploads.log')
io = params[:filedata]
log.info "Receiving #{io.original_filename} from #{current_user.email}"