Skip to content

Commit 0a1b587

Browse files
committed
add confirmation to pastebin command; too many people accidentally posting sensitive data
1 parent ac14e96 commit 0a1b587

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bpython/repl.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,12 @@ def write2file(self):
625625
def pastebin(self):
626626
"""Upload to a pastebin and display the URL in the status bar."""
627627

628+
if not self.statusbar.prompt("Pastebin buffer? (y/N) "
629+
).lower().startswith('y'
630+
):
631+
self.statusbar.message("Pastebin aborted")
632+
return
633+
628634
pasteservice = ServerProxy(self.config.pastebin_url)
629635

630636
s = self.getstdout()

0 commit comments

Comments
 (0)