1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
Alexandre Alapetite e55cbb3e3d
Fix bug in debug node due to msg.hasOwnProperty construct
`msg.hasOwnProperty("status")` might make the debug node crash/produce an error if the payload was created with `Object.create(null)`.
This is the case e.g. for `ini` (to parse INI files), an official NPM node:
4f289946b3/lib/ini.js (L63)

My Node-RED node `node-red-contrib-parser-ini`, which is using that library, was hit by this bug and I had to ship a workaround
fe6b1eb4b1/parser-ini.js (L14)

The `msg.hasOwnProperty("xxx")` construct should not be used since ECMAScript 5.1.

ESLint advises in the same direction https://eslint.org/docs/rules/no-prototype-builtins

This patch was produced using the following regex:
Search: `\b([\w.]+).hasOwnProperty\(`
Replace: `Object.prototype.hasOwnProperty.call($1, `

This could be applied more gobally if desired.
2022-02-03 02:01:22 +01:00
2021-07-20 11:04:25 +01:00
2021-03-12 13:07:12 +00:00
2017-06-23 21:49:35 +01:00
2018-09-28 16:21:49 +01:00
2021-04-27 17:30:30 +01:00
2022-01-27 10:12:06 +00:00
2016-04-07 21:51:12 +01:00
2019-01-28 14:40:42 +00:00
2020-09-29 20:28:15 +01:00
2022-01-27 12:57:32 +00:00
2022-01-27 12:49:48 +00:00

Node-RED

http://nodered.org

Build Status Coverage Status

Low-code programming for event-driven applications.

Node-RED: Low-code programming for event-driven applications

Quick Start

Check out http://nodered.org/docs/getting-started/ for full instructions on getting started.

  1. sudo npm install -g --unsafe-perm node-red
  2. node-red
  3. Open http://localhost:1880

Getting Help

More documentation can be found here.

For further help, or general discussion, please use the Node-RED Forum or slack team.

Developers

If you want to run the latest code from git, here's how to get started:

  1. Clone the code:

     git clone https://github.com/node-red/node-red.git
     cd node-red
    
  2. Install the node-red dependencies

     npm install
    
  3. Build the code

     npm run build
    
  4. Run

     npm start
    

Contributing

Before raising a pull-request, please read our contributing guide.

This project adheres to the Contributor Covenant 1.4. By participating, you are expected to uphold this code. Please report unacceptable behavior to any of the project's core team at team@nodered.org.

Authors

Node-RED is a project of the OpenJS Foundation.

It is maintained by:

Copyright OpenJS Foundation and other contributors, https://openjsf.org under the Apache 2.0 license.

Description
No description provided
Readme
Languages
JavaScript 99.7%
HTML 0.3%