mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
DO NOT remove the : character when sanitizing paths. That breaks NPM for packages
This commit is contained in:
@@ -102,7 +102,7 @@ _.extend(Builder.prototype, {
|
|||||||
// Basic sanitization
|
// Basic sanitization
|
||||||
if (part.match(/^\.+$/))
|
if (part.match(/^\.+$/))
|
||||||
throw new Error("Path contains forbidden segment '" + part + "'");
|
throw new Error("Path contains forbidden segment '" + part + "'");
|
||||||
part = part.replace(/[^a-zA-Z0-9._-]/g, '');
|
part = part.replace(/[^a-zA-Z0-9._\:-]/g, '');
|
||||||
|
|
||||||
// If at last component, pull extension (if any) off of part
|
// If at last component, pull extension (if any) off of part
|
||||||
var ext = '';
|
var ext = '';
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ var release = require('./release.js');
|
|||||||
// XXX: This is a medium-term hack, to avoid having the user set a package name
|
// XXX: This is a medium-term hack, to avoid having the user set a package name
|
||||||
// & test-name in package.describe. We will change this in the new control file
|
// & test-name in package.describe. We will change this in the new control file
|
||||||
// world in some way.
|
// world in some way.
|
||||||
var AUTO_TEST_POSTFIX = "-localtest";
|
var AUTO_TEST_POSTFIX = ":test";
|
||||||
var isTestName = function (name) {
|
var isTestName = function (name) {
|
||||||
var nameEnd = name.substr(name.length - AUTO_TEST_POSTFIX.length);
|
var nameEnd = name.substr(name.length - AUTO_TEST_POSTFIX.length);
|
||||||
return nameEnd === AUTO_TEST_POSTFIX;
|
return nameEnd === AUTO_TEST_POSTFIX;
|
||||||
|
|||||||
Reference in New Issue
Block a user