Jump to content
MakeWebGames

Recommended Posts

Posted

make a file 5050points.php

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

SQL

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

all secure as far as i know

Posted

I was looking at your SQL only... and soon spotted things you should not have:

Line 59 you directly place $_POST[amount] into your query! No way! NEVER EVER place a variable received from the browser directly into a query! So no your code is not secure.

  • 4 months later...
Posted

Ermm.

You have _target="blank" why? That'd open a new tab or page depending on browser...

Also < href="http://blah.php"> why have http://? simply href="5050.php" would do.

Amount and newpoints needs abs(intval());

Also $winner = rand(0,1); could be better with mt_rand() :)

And selecting owner from the DB... Use MRES because some people might not have secured thier user name change so this could be a place to exploit it.

It's a real nice mod but it's just C/P from money 5050 and changed with points....

Thanks for posting it anyway :)

Posted (edited)
I was looking at your SQL only... and soon spotted things you should not have:

Line 59 you directly place $_POST[amount] into your query! No way! NEVER EVER place a variable received from the browser directly into a query! So no your code is not secure.

just use; mysql_real_escape_string($_POST[amount]) and its more secure^^

Edited by H4x0r666
oops there was already an answer like this :S sorry..
  • 2 weeks later...
Posted

MRES is fcking useless for numbers.

inputting $newpoints into DB with little filtering is another fail.

Try adding abs(intval());

That will make sure it's a number and nothing else.

Sprintf(); is just slowing it down along with all the MRES :S

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...