angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Potentially unsafe regular expression on new project - (regex-not update)

Open micahwood opened this issue 8 years ago • 4 comments

Versions

Angular CLI: 1.7.0
Node: 8.9.3
OS: linux x64
Angular: 5.2.5
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.7.0
@angular-devkit/build-optimizer: 0.3.1
@angular-devkit/core: 0.3.1
@angular-devkit/schematics: 0.3.1
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.0
@schematics/angular: 0.3.1
@schematics/package-update: 0.3.1
typescript: 2.5.3
webpack: 3.11.0

Repro steps

  • Create a new cli project
  • run ng serve

Observed behavior

potentially unsafe regular expression: ^(?:(?!(?:[\[!*+?$^"'.\\/]+)).)+
Error: potentially unsafe regular expression: ^(?:(?!(?:[\[!*+?$^"'.\\/]+)).)+
    at Function.toRegex.create (/home/micah/Documents/clients/dnastory/dashboard/node_modules/regex-not/index.js:62:11)
    at createTextRegex (/home/micah/Documents/clients/dnastory/dashboard/node_modules/nanomatch/lib/parsers.js:378:22)
    at Object.<anonymous> (/home/micah/Documents/clients/dnastory/dashboard/node_modules/nanomatch/lib/parsers.js:14:11)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/micah/Documents/clients/dnastory/dashboard/node_modules/nanomatch/index.js:16:15)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)

Desired behavior

The server starts

Mention any other details that might be useful (optional)

Tested this on a new project created with versions 1.6.8 and 1.7.0 of the cli. An issue has been created with the regex-not project - https://github.com/jonschlinkert/regex-not/issues/3 This is the commit that added the safe-regex functionality - https://github.com/jonschlinkert/regex-not/commit/4225c06dde12c6bee6ab9f75caafa27c932313ba

micahwood avatar Feb 20 '18 02:02 micahwood

Bump... I'm getting the same issue on windows x86-64

jmarlow4 avatar Feb 20 '18 02:02 jmarlow4

👉 This has been fixed 👈

See https://github.com/jonschlinkert/regex-not/issues/3#issuecomment-366850811 for details

@micahwood, I recommend adding "FIXED" to the issue title with a link to the solution: https://github.com/jonschlinkert/regex-not/issues/3#issuecomment-366850811.

Also, consider closing and locking the issue to prevent more "me too" comments that will make it harder to see that the issue was already solved.

jonschlinkert avatar Feb 20 '18 02:02 jonschlinkert

This appears to be fixed, closing this issue.

Brocco avatar Feb 20 '18 20:02 Brocco

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.