Jump to content

Security


jaymc

Recommended Posts

For my website, members can delete each other as a friend via

 

deletefriend.php?user=jamie

 

Some people are creating links that when clicked redirect to deletefriend.php?user=jamie

 

This obviously delete the friend for who clicks it

 

Whats the best way to stop this, apart from having people enter the dynamic codes

Cheers

Link to comment
Share on other sites

parse the links people make, and remove deletefriend.php or user=jamie

 

so... if they make a link parse it like this:

 

preg_replace("~deletefriend.php~","index.php",$inserttext);

 

Another thing to do would be to make the user confirm the deletion of a friend, so it would take them to a page where it would say:

 

"Are you sure you want to delete Jamie as a friend?"

 

Then there is a "Yes" and a "No" button or link.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

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.