GeezerVison is showing github.com — doc: add alert on REPL from TCP socket · nodejs/node@22a103e
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/repl.md +8Lines changed: 8 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -774,6 +774,14 @@ a `net.Server` and `net.Socket` instance, see: |
774 | 774 | For an example of running a REPL instance over [`curl(1)`][], see: |
775 | 775 | <https://gist.github.com/TooTallNate/2053342>. |
776 | 776 |
|
| 777 | +This example is intended purely for educational purposes to demonstrate how |
| 778 | +Node.js REPLs can be started using different I/O streams. |
| 779 | +It should **not** be used in production environments or any context where security |
| 780 | +is a concern without additional protective measures. |
| 781 | +If you need to implement REPLs in a real-world application, consider alternative |
| 782 | +approaches that mitigate these risks, such as using secure input mechanisms and |
| 783 | +avoiding open network interfaces. |
| 784 | + |
777 | 785 | [TTY keybindings]: readline.md#tty-keybindings |
778 | 786 | [ZSH]: https://en.wikipedia.org/wiki/Z_shell |
779 | 787 | [`'uncaughtException'`]: process.md#event-uncaughtexception |
|