Skip to content

run-module-worker.js doesn't check message.hash correctly (bad 'if' compare) #11842

Closed
@scovetta

Description

@scovetta

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [X] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

master

Repro steps

The file packages/angular_devkit/build_angular/src/utils/run-module-worker.js contains a bug in an if statement -- this will always evaluate to 'true':

  if (message.hash = '5d4b9a5c0a4e0f9977598437b0e85bcc') {

I believe this is intended to be either == or ===:

  if (message.hash == '5d4b9a5c0a4e0f9977598437b0e85bcc') {

The log given by the failure

n/a

Desired functionality

n/a

Mention any other details that might be useful

This was found through static analysis.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions