Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Summary
GridAttachment is a GridFS plugin for MongoDB ORMs. Supports MongoMapper, Mongoid, MongoODM, and Mongomatic.
Support is built in for rack_grid and rack_grid_thumb to generate URLS and thumbnails: http://github.com/dusty/rack_grid http://github.com/dusty/rack_grid_thumb
You can pass in a File or a Hash as received by Sinatra on file uploads.
Installation
Usage
require 'grid_attachment/mongo_mapper' class Monkey include MongoMapper::Document plugin GridAttachment::MongoMapper
attachment :image, :prefix => :grid
end
require 'grid_attachment/mongo_odm' class Monkey include MongoODM::Document include GridAttachment::MongoODM
attachment :image, :prefix => :grid
end
require 'grid_attachment/mongomatic' class Monkey < Mongomatic::Base include GridAttachment::Mongomatic
attachment :image, :prefix => :grid
end
require 'grid_attachment/mongoid' class Monkey include Mongoid::Document include GridAttachment::Mongoid
attachment :image, :prefix => :grid
end
m = Monkey.new(:name => 'name') m.save
m.image = File.open('/tmp/me.jpg') m.save
m.image = nil m.save
m.image.read
m.image_url # /grid/4e049e7c69c3b27d53000005/me.jpg
m.image_thumb('50x50') # /grid/4e049e7c69c3b27d53000005/me_50x50.jpg
post '/monkeys' do m = Monkey.new m.image = params[:image] m.save # Or just Monkey.new(params).save end
Inspired By
FAQs
Unknown package
We found that grid_attachment demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.