Opened 8 years ago

Closed 8 years ago

#27600 closed New feature (fixed)

Support reading commands from stdin in shell command

Reported by: James Pic Owned by: nobody
Component: Core (Management commands) Version: 1.10
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently, it's possible to inject code via stdin into the shell command, but it doesn't work very well because it outputs the python prompt and garbles both input and output.

This ticket proposes to properly read commands from stdin in the shell command.

Change History (4)

comment:1 by Tim Graham, 8 years ago

Component: UncategorizedCore (Management commands)
Has patch: set
Type: UncategorizedNew feature

comment:2 by James Pic, 8 years ago

Thanks a heap Tim !

I changed the patch so that there's no extra argument to pass, it will read from standard input automatically if there's anything and otherwise go on as usual, exactly like the python CLI itself.

comment:3 by Tim Graham, 8 years ago

Triage Stage: UnreviewedAccepted

comment:4 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In bf6392bb:

Fixed #27600 -- Suppressed the REPL during shell's reading from stdin.

Thanks Adam Chainz for review and guidance.

Note: See TracTickets for help on using tickets.
Back to Top