Jump to content
MakeWebGames

Recommended Posts

Posted

Hi ya'll.

 

A few months back I tried this and failed to secure it, I never actually released a secured version from then on as back then I struggled when it came to security, I have improved in the security | Optimization departments, I've been rather bored and not released anything for a good month + now so I thought I'd secure/update this particular file as it's not really mentioned much and plays a pretty important role in the game.

 

Simply replace this with you're current imadd.php

 

You're unable to view this code.

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

 

You're done.

- It was early when I coded this, I haven't really slept so they may be a few spelling mistake's, but yeah, it's pretty good I hope :)

This has been tested fully.

Posted

Well done!

Well done Jordan!

Looking good mate. Hey, we all make some spelling mistakes some times(Not that I can see any). :D

But what I understand from SQL is that ( * ) selects all the Db row/query, something like that. But your first mysql_query(). Your selecting all the database twice.

[mysql]$q=$db->query("SELECT iv.*,i.* FROM inventory iv LEFT JOIN items i ON iv.inv_itemid=i.itmid WHERE inv_id=".abs(intval($_GET['ID']))." and inv_userid=$userid");[/mysql]

I'm not sure if this is a different way of selecting some, if so my bad. :)

Posted
$_GET['price'] -- i see nothing, security wise.

You're unable to view this code.

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

Jordan i do like how you do it but maybe for the inexperienced people do it at the top of the file...

Posted

@ Danny:

I looked up Abs a month or so ago, and if I can remember ( .abs(intval) ) Makes sure the number is correct not false. I'm not exacly sure about the whole Abs securing thing. But please do correct me if wrong Danny. :)

Sorry for double post.

Posted

Looking good, you could probably look up mysql indexation and how to perform a query efficiently.

Just a few minor pickets I have but I won't bother going into them as they're minor and people have different preferences

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