Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-site Script Vulnerability - can inject javascript into URI #49

Closed
GoogleCodeExporter opened this issue Feb 1, 2016 · 2 comments
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Insert a javascrpt in the URI and the browser will execute it.  See
sample script below.

http://www.somewebsite.com/wp-content/themes/mytheme/scripts/timthumb.php?src=ht
tp%3A%2F%2Fwww.somewebsite.com%2Ffiles%2F2009%2F11%2FSomeImage.gif%22%3E%3Cscrip
t%3Ealert%28123%29%3C%2Fscript%3E&amp=&zc=1&w=120&h=90%22

What is the expected output? What do you see instead?
It should do string validation to prevent scripts form executing.  Removing
"<" and ">" would likely do the trick.

What version of the product are you using? On what operating system?
Latest version as far as I know.

Please provide any additional information below.

Original issue reported on code.google.com by jimgoi...@gmail.com on 2 Dec 2009 at 10:17

@GoogleCodeExporter
Copy link
Author

I was able to fix this issue by adding one line to the clean function:
$src = htmlentities($src);

Can someone please look at this and check it in? :)

Original comment by jimgoi...@gmail.com on 7 Dec 2009 at 4:55

@GoogleCodeExporter
Copy link
Author

thanks for the report, I have implemented your suggest fix

Original comment by BinaryMoon on 31 Dec 2009 at 7:18

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant