Skip to content

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

@micahwood

Description

@micahwood

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 - jonschlinkert/regex-not#3
This is the commit that added the safe-regex functionality - jonschlinkert/regex-not@4225c06

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions