![]() |
Well, this script needs a couple of security modifications--it's open to XSS vulnerabilities big time.
I don't have time to look at the code right now, but perhaps someone who's more familiar with javascript could take a look at this. Using the word "javascript" in the text of a message you're spell checking will let you run whatever you'd like. This needs to be htmlspecialchars()'d and properly handle the word javascript in a message. |
Quote:
The error message means you don't have pspell compiled into PHP. |
Quote:
I can't seem to reproduce what you're saying. The line "$outtext = htmlentities(stripslashes($checktext));" should prevent what you are experiencing. |
Try the following condition:
<misspelt word> javascript </script> I.e. d0gzasdf javascript </script> |
This is the output I get:
Quote:
|
Oops. I mixed up examples :) Appending </script> to the body will cause an error when pressing "Finished Checking" ... to see the javascript issue, remove the </script>.
Try asdfasdf javascript asdfasdf |
Yep got some malformed output. But still can't understand how this can be exploited.
The reason its malformed is because it replaces all javascript references, including the ones the spellchecker creates to a link to be corrected. |
Hrmm. I haven't been able to come up with a way to exploit it myself, but seeing as input text is being processed as part of the script, a bunch of red flags go up.
How can we sandbox it? Any luck with Netscape/Opera? |
Just a note on the NS/Opera issue--I have a suspicion that the hidden form being called in spellcheck.php is the problem here--specifically, I think forms are only recognized by NS/Opera within <body></body> tags--since this form is hidden in a frameset page, I believe that's where the problem is arising.
I'll let you know what I find out. |
Unfortunately, you can't have <body> and <frameset> tags in the same page. I've been able to confirm that the issue with Netscape and Opera is the <form> code being placed in the frameset in spellcheck.php--this is illegal html. According to w3c specifications, <form> can only be placed within <body> tags.
I don't know enough javascript to get this thing to work -- would it be possible to move the form to the templates instead? |
All times are GMT. The time now is 01:06 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|