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

webdav-test

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webdav-test - npm Package Compare versions

Comparing version 1.1.7 to 1.1.8

17

dist/request.js

@@ -15,2 +15,11 @@ "use strict";

function splitInvalidURL(url) {
var sections = url.split("/");
url = {};
url.protocol = sections[0] + '//';
url.hostname = sections[2];
url.path = '/' + sections.slice(3, sections.length).join('/');
return url;
}
function request(fullUrl, options) {

@@ -21,6 +30,6 @@ console.log("REQUEST: URL");

console.log(options);
var splitUrl = new URL(fullUrl);
var encodedURI = encodeURIPath(splitUrl.pathname);
console.log(splitUrl.origin + encodedURI);
return fetchMethod(splitUrl.origin + encodedURI, options);
var splitUrl = splitInvalidURL(fullUrl);
var encodedURI = encodeURIPath(splitUrl.path);
console.log(encodedURI);
return fetchMethod(splitUrl.protocol + splitUrl.hostname + encodedURI, options);
}

@@ -27,0 +36,0 @@

{
"name": "webdav-test",
"version": "1.1.7",
"version": "1.1.8",
"description": "WebDAV client for NodeJS",

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

@@ -15,3 +15,12 @@ "use strict";

function splitInvalidURL(url){
const sections = url.split("/");
url = {};
url.protocol = sections[0] + '//';
url.hostname = sections[2];
url.path = '/' + sections.slice(3, sections.length).join('/');
return url;
}
function request(fullUrl, options) {

@@ -22,6 +31,6 @@ console.log("REQUEST: URL");

console.log(options);
const splitUrl = new URL(fullUrl);
const encodedURI = encodeURIPath(splitUrl.pathname);
console.log(splitUrl.origin + encodedURI);
return fetchMethod(splitUrl.origin + encodedURI, options);
const splitUrl = splitInvalidURL(fullUrl);
const encodedURI = encodeURIPath(splitUrl.path);
console.log(encodedURI);
return fetchMethod(splitUrl.protocol + splitUrl.hostname + encodedURI, options);
}

@@ -28,0 +37,0 @@

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