Jump to content

Recommended Posts

got it handled

 

Apparently not. ;)

 

Now on every page you get an alert box saying '1', because I included script in my username. I could input javascript from my site, but then no one could again test your site.. :P So I won't.

 

Also it says 'Error: Your IP address has already been used in this ladder', so I reset my internet connection and was able to make another account, so you probably shouldn't do it by IP.

 

Sam

Cross Site Scripting:

You can add ">code when adding news.

 

Cross Site Scripting:

You can add ">code when creating groups.

 

You can type in non integers when filling in the position for creating groups.

 

The admin logs page has XSS flaws.

 

You can submit ">code when adding bans.

 

How do i fix these xss's?

 

XSS is means that if the user inputs HTML code into your registration field and submit it, it will input that HTML into your source code, thus running what they put in.  So with php there is a function called htmlspecialchars, which means that if you use the code like

 

$user = $_POST['username'];

 

This uses anything the user types in the field, instead you should use:

$user = htmlspecialchars($_POST['username']);

 

This will turn <script> (which can be dangerous) into <script>, which is perfectly harmless. Though the latter doesn't look that nice, so when you pull down the data from the database you should use htmlspecialchars_decode.

 

Hope that helps,

 

Sam

I just realized it already does that......but not sure if it works..

 

Heres the code

$team[name]=charecters($team[name]);

 

Heres the function

function charecters($text){
$text=wordwrap($text,100," ",1);
$text=htmlspecialchars("$text");
$text=trim($text);
return($text);
}

I just realized it already does that......but not sure if it works..

 

Heres the code

$team[name]=charecters($team[name]);

 

Heres the function

function charecters($text){
$text=wordwrap($text,100," ",1);
$text=htmlspecialchars("$text");
$text=trim($text);
return($text);
}

 

take out the the "" in htmlspecialchars("$text");

 

so it'd be

$text = htmlspecialchars($text);

 

Sam

×
×
  • 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.