1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-23 22:30:07 +00:00
Commit graph

8 commits

Author SHA1 Message Date
Marc Cornellà
72928432f1
fix(plugins): fix potential command injection in rand-quote and hitokoto
The `rand-quote` plugin uses quotationspage.com and prints part of its content to the
shell without sanitization, which could trigger command injection. There is no evidence
that this has been exploited, but this commit removes all possibility for exploit.

Similarly, the `hitokoto` plugin uses the hitokoto.cn website to print quotes to the
shell, also without sanitization. Furthermore, there is also no evidence that this has
been exploited, but with this change it is now impossible.
2021-11-11 22:45:24 +01:00
Marc Cornellà
76bfa7dd2a
rand-quote: refactor rand-quote function
- Make function variables local
- Use prompt color sequences
- Use guard clause to check for curl
- Improved syntax
2018-06-29 18:16:10 +02:00
Marc Cornellà
787c6899d4
rand-quote: update URL
Fixes #6949
2018-06-29 17:50:32 +02:00
Robin Daugherty
96aefd2b98 Remove code, not comment it out
Gaaah.
2015-08-26 14:12:42 -04:00
Robin Daugherty
241be2d28b Fix rand-quote failure when site is unreachable
This plugin was designed so that if there is any failure, it will simply call itself recursively. Which means that if you were working offline, if `quote` was called in your `.zshrc`, you would be unable to open a new terminal session.

I fixed this by allowing the plugin to output nothing if a quote could not be fetched.
2015-08-26 13:24:59 -04:00
Eduardo San Martin Morote
37be62ffb7 randquote plugin
correcting an issue about encoding some people was having
added a message when the user doesn't have curl
added varibles for colors->easier to customize
2013-10-31 13:38:12 +01:00
San Martin Morote Eduardo
60aa92bae3 Messed up the comment somehow... 2013-06-09 11:04:39 +02:00
San Martin Morote Eduardo
e4884da5a0 Random quotes from the internet 2013-06-09 11:01:20 +02:00