A
A
Alexander2011-12-15 07:51:19
PHP
Alexander, 2011-12-15 07:51:19

How to get rid of XSS from a remote page in a frame?

To simplify the example, I will give the following code

. There is a form on the page:

<form id='send' action='../lib/getpage.php' method='post' target='getpage'><br>
       <input id='url' name='url' type='text' value=''><br>
</form><br>

Which betrays the getpage.php file into a frame:
<iframe id='getpage' name='getpage' src='' class='autoHeight' frameborder='0' scrolling='auto'></iframe><br>

The getpage.php file itself produces the page body:
<?<br>
       $url = $_POST['url'];<br>
       $page = file_get_html($url);<br>
       echo $page;<br>
?><br>


If the deleted page contains XSS code, will it affect my site and if so, how to get rid of it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2011-12-15
@cry_san

and if just cut out all possible xss in $page before output in getpage.php?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question