From 44b521753871c8ecc06e4cd31b8827d62b6f63f7 Mon Sep 17 00:00:00 2001 From: Lorenzo Angelini Date: Fri, 6 Mar 2020 09:14:28 +0100 Subject: [PATCH] remove shell-escaping url in S3ZipContent (#200) --- .travis.yml | 4 ++-- lib/strategy/s3_zip_content.js | 4 +--- package-lock.json | 7 +------ package.json | 5 ++--- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 072315a..edd042e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,8 @@ services: - docker env: global: - - KUBELESS_VERSION: v1.0.0-alpha.8 - - KUBELESS_KAFKA_VERSION: v1.0.0-beta.0 + - KUBELESS_VERSION: v1.0.6 + - KUBELESS_KAFKA_VERSION: v1.0.2 - MINIKUBE_VERSION: v0.25.2 - REPO_DOMAIN: serverless - REPO_NAME: serverless-kubeless diff --git a/lib/strategy/s3_zip_content.js b/lib/strategy/s3_zip_content.js index 3231ead..6b61440 100644 --- a/lib/strategy/s3_zip_content.js +++ b/lib/strategy/s3_zip_content.js @@ -21,7 +21,6 @@ const crypto = require('crypto'); const fs = require('fs'); const AWS = require('aws-sdk'); const BbPromise = require('bluebird'); -const shellescape = require('shell-escape'); class S3ZipContent { constructor(strategy, options) { @@ -56,9 +55,8 @@ class S3ZipContent { Expires: options.expires, }); - // fixme: unescaped url in pkg/utils/kubelessutil.go:82 resolve({ - content: shellescape([url]), + content: url, checksum: `sha256:${shasum.digest('hex')}`, contentType: 'url+zip', }); diff --git a/package-lock.json b/package-lock.json index e1d0985..47819b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "serverless-kubeless", - "version": "0.9.0", + "version": "0.9.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2019,11 +2019,6 @@ "integrity": "sha1-fnQlb7qknHWqfHogXMInmcrIAAQ=", "dev": true }, - "shell-escape": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/shell-escape/-/shell-escape-0.2.0.tgz", - "integrity": "sha1-aP0CXrBJC09WegJ/C/IkgLX4QTM=" - }, "shelljs": { "version": "0.7.8", "resolved": "https://artifactory.rnd-hub.com:443/artifactory/api/npm/ws-npm/shelljs/-/shelljs-0.7.8.tgz", diff --git a/package.json b/package.json index 29e69d1..5d1215e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "serverless-kubeless", - "version": "0.9.1", + "version": "0.9.2", "description": "This plugin enables support for Kubeless within the [Serverless Framework](https://github.com/serverless).", "main": "index.js", "directories": { @@ -29,8 +29,7 @@ "jszip": "^3.1.3", "kubernetes-client": "^3.12.0", "lodash": "^4.17.4", - "moment": "^2.18.1", - "shell-escape": "^0.2.0" + "moment": "^2.18.1" }, "devDependencies": { "chai": "^4.0.2",