Comparing version 14.1.2 to 14.1.3
@@ -841,7 +841,7 @@ var async = require("async"), path = require("path"), util = require("util"), http = require("http"), EventEmitter = require("events").EventEmitter, express = require("express"), io = require("socket.io"), Errors = require("./errors"), Const = require("./const"); | ||
Server.prototype._saveFixtureCode = function(req, res) { | ||
var filename = req.param("filename"), urlPath = req.param("curPath"), code = req.param("code"), vfsPath = urlPath ? decodeURI(urlPath) : "", fixturePath = path.join(vfsPath, filename); | ||
var filename = req.param("filename"), urlPath = req.param("curPath"), code = req.param("code"), vfsPath = urlPath ? decodeURI(urlPath) : "", fixturePath = path.join(vfsPath, filename), errMsgBuilder = this.errMsgBuilder; | ||
this.vfs.saveFixtureCode(fixturePath, code, function(err) { | ||
if (err) { | ||
res.status(403); | ||
res.send(err); | ||
res.send(errMsgBuilder.build(err)); | ||
} else { | ||
@@ -848,0 +848,0 @@ res.status(200); |
@@ -141,3 +141,4 @@ var zlib = require("zlib"), whacko = require("whacko"), iconv = require("iconv-lite"), sharedConst = require("./../shared/const"), urlUtil = require("./../shared/url_util"), pageProc = require("./../shared/page_processor"), ProcessedJsCache = require("./processed_js_cache"), ERR = require("./server_errs"); | ||
var rawDataProcessor = function(rawData, actualCharset) { | ||
var $ = null; | ||
var $ = null, bom = pageProc.getBOM(rawData); | ||
rawData = bom ? rawData.replace(bom, "") : rawData; | ||
try { | ||
@@ -186,3 +187,3 @@ $ = whacko.load(rawData); | ||
} | ||
return $.html(); | ||
return (bom || "") + $.html(); | ||
}; | ||
@@ -189,0 +190,0 @@ inject(chunks, encoding, charset, callback, rawDataProcessor); |
@@ -85,2 +85,9 @@ (function() { | ||
JSProcessor.wrappedProperties = { | ||
protocol: true, | ||
host: true, | ||
hostname: true, | ||
port: true, | ||
pathname: true, | ||
origin: true, | ||
search: true, | ||
data: true, | ||
@@ -87,0 +94,0 @@ text: true, |
@@ -35,6 +35,2 @@ (function() { | ||
PageProc.TARGET_ATTR_TAGS = TARGET_ATTR_TAGS; | ||
var getBOM = function(text) { | ||
var match = text.match(BOM_REGEX); | ||
return match ? match[0] : null; | ||
}; | ||
var getAttr = function($el, attr) { | ||
@@ -219,2 +215,6 @@ return isNode ? $el[0].attribs[attr] : NativeMethods.getAttribute.call($el[0], attr); | ||
}; | ||
PageProc.getBOM = function(text) { | ||
var match = text.match(BOM_REGEX); | ||
return match ? match[0] : null; | ||
}; | ||
PageProc.getStoredAttrName = function(attr) { | ||
@@ -224,3 +224,3 @@ return attr + SharedConst.DOM_SANDBOX_STORED_ATTR_POSTFIX; | ||
PageProc.processScript = function(text, withoutHeader) { | ||
var bom = getBOM(text); | ||
var bom = PageProc.getBOM(text); | ||
if (bom) { | ||
@@ -227,0 +227,0 @@ text = text.replace(bom, ""); |
@@ -224,3 +224,3 @@ (function() { | ||
UrlUtil.isSupportedProtocol = function(url) { | ||
return !/(^javascript:)|(^about:)|(^mailto:)|(^tel:)|(^data:)|(^skype:)|(^file:)|(^#)/.test(url); | ||
return !/(^javascript:)|(^about:)|(^mailto:)|(^tel:)|(^data:)|(^skype:)|(^file:)|(^#)/i.test(url); | ||
}; | ||
@@ -227,0 +227,0 @@ UrlUtil.parseQuery = function() { |
@@ -1,1 +0,1 @@ | ||
exports.TestCafe = require('./lib/server/test_cafe').TestCafe; | ||
module.exports = require('./lib/server/test_cafe').TestCafe; |
var ERR = require("./../server/server_errs"), async = require("async"), child_process = require("child_process"), dns = require("dns"), fs = require("fs"), os = require("os"), path = require("path"), http = require("http"), InstalledBrowsers = require("./installed_browsers"), TCPPorts = require("./tcp_ports"), Validator = require("./validator"); | ||
var CFG_FILE_NAME = "config.json", PACKAGE_JSON_FILE_NAME = "package.json", DEFAULT_CONTROL_PANEL_PORT = 1337, DEFAULT_SERVICE_PORT = 1338, CHECKING_HOST_PORT = 1400, CHECKING_REQUEST_TIMEOUT = 3e3, WIN_PLATFORM = /^win/.test(process.platform), MAC_PLATFORM = process.platform === "darwin", WIN_DEFAULT_TESTS_DIR = WIN_PLATFORM ? path.join(process.env["PUBLIC"], "Documents", "DevExpress Demos", "TestCafe", "my_tests") : "", EXAMPLES_DIR = path.join(__dirname, "../../examples"), DEFAULT_TESTS_DIR = path.join(__dirname, "../../my_tests"), INSTALL_DATE_REG_KEY = "HKEY_CLASSES_ROOT\\Licenses\\6F0F8269-1516-44C6-BD30-0E90BE27871C", LICENSE_DATE_REG_KEY = "HKEY_CLASSES_ROOT\\Licenses\\0378852D-D597-4A32-B6D9-680A16A3CDA6"; | ||
var CFG_FILE_NAME = "config.json", PACKAGE_JSON_FILE_NAME = "package.json", DEFAULT_CONTROL_PANEL_PORT = 1337, DEFAULT_SERVICE_PORT = 1338, CHECKING_HOST_PORT = 1400, CHECKING_REQUEST_TIMEOUT = 3e3, WIN_PLATFORM = /^win/.test(process.platform), MAC_PLATFORM = process.platform === "darwin", WIN_DEFAULT_TESTS_DIR = WIN_PLATFORM ? path.join(process.env["USERPROFILE"], "Documents", "TestCafe", "Tests") : "", EXAMPLES_DIR = path.join(__dirname, "../../examples"), DEFAULT_TESTS_DIR = path.join(__dirname, "../../my_tests"), INSTALL_DATE_REG_KEY = "HKEY_CLASSES_ROOT\\Licenses\\6F0F8269-1516-44C6-BD30-0E90BE27871C", LICENSE_DATE_REG_KEY = "HKEY_CLASSES_ROOT\\Licenses\\0378852D-D597-4A32-B6D9-680A16A3CDA6"; | ||
@@ -146,3 +146,3 @@ function copyDirRecursiveSync(from, to) { | ||
}); | ||
if (curVersionArr[0] < actualVersionArr[0] || curVersionArr[0] === actualVersionArr[0] && (curVersionArr[1] < actualVersionArr[1] || curVersionArr[1] === actualVersionArr[1] && curVersionArr[2] < actualVersionArr[2])) { | ||
if (curVersionArr[0] < actualVersionArr[0] || curVersionArr[0] === actualVersionArr[0] && (curVersionArr[1] < actualVersionArr[1] || curVersionArr[1] === actualVersionArr[1] && curVersionArr[2].toString() < actualVersionArr[2].toString())) { | ||
newVersion = version; | ||
@@ -149,0 +149,0 @@ } |
{ | ||
"name": "testcafe", | ||
"description": "Functional testing for the web", | ||
"version": "14.1.2", | ||
"version": "14.1.3", | ||
"dependencies": { | ||
@@ -6,0 +6,0 @@ "async": "0.2.6", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
2373222
18054