New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@orbiting/backend-modules-assets

Package Overview
Dependencies
Maintainers
6
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orbiting/backend-modules-assets - npm Package Compare versions

Comparing version 1.0.3 to 1.0.5

19

CHANGELOG.md

@@ -1,6 +0,21 @@

<a name="1.0.3"></a>
## 1.0.3 (2018-01-14)
<a name="1.0.5"></a>
## 1.0.5 (2018-01-16)
<a name="1.0.4"></a>
## 1.0.4 (2018-01-16)
<a name="1.0.4"></a>
## 1.0.4 (2018-01-16)
### Bug Fixes
* whitelist gif images ([43d0535](https://github.com/orbiting/backend-modules/commit/43d0535))
<a name="1.0.3"></a>

@@ -7,0 +22,0 @@ ## 1.0.3 (2018-01-14)

15

express/assets.js

@@ -27,3 +27,3 @@ const sharp = require('sharp')

if (width > maxSize || height > maxSize) {
throw new Error('maxSize: '+ maxSize)
throw new Error('maxSize: ' + maxSize)
}

@@ -42,3 +42,3 @@ return {

height = dimensions.height
} catch(e) {
} catch (e) {
res.status(400).end(e.message)

@@ -50,2 +50,8 @@ }

const isGIF = type && type.ext === 'gif'
if (isGIF) {
return res.end(buffer)
}
if (width || height || isJPEG) {

@@ -132,3 +138,3 @@ let image = sharp(buffer)

if (!mac || mac !== authenticate(url)) {
console.warn('unauthorized asset url requested: '+url)
console.warn('unauthorized asset url requested: ' + url)
return res.status(403).end()

@@ -138,3 +144,3 @@ }

const buffer = await fetch(url, {
method: 'GET',
method: 'GET'
})

@@ -149,3 +155,2 @@ .then(response => response.buffer())

})
}
{
"name": "@orbiting/backend-modules-assets",
"version": "1.0.3",
"version": "1.0.5",
"description": "server assets",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc