Jump to content

Hacker Problem on my 1and1 Site


dmonster05

Recommended Posts

Hi,

I have an account with 1and1.com and my web page uses php.  Lately I have been attacked by a hacker, and when I sent an email to 1and1 support, they told me to look at some patches for my php scripts, since I use index.php.  Can anyone help me out? It is really frustrating to me so please help if you can.

 

Thank you,

dmonster05

Link to comment
https://forums.phpfreaks.com/topic/113969-hacker-problem-on-my-1and1-site/
Share on other sites

It is mine, and I believe I have found a solution.

 

the code I was using was

 

if (!empty($page)) {

include("$page");

}

else {

include('base.html');

}

 

and it was reading page from the navigation bar.

 

 

i have put a check on page now for only my pages, by creating an array and checking if it is in the array.

 

$pages = array('base.html', 'shirts.html', 'web_design.html', 'slide_show.html', 'about.html', 'contact.html');

 

$page = $_GET['page'];

 

if( in_array($page, $pages) )

...

 

Does this seem like a good solution?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.