Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Addons/Mods Graveyard

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #13  
Old 04-02-2009, 01:29 PM
kisazeky kisazeky is offline
Member
 
Join Date: Mar 2009
Posts: 44
Credits: 27,560
kisazeky
Default RE: Rename adoptables (Updated!!)

I included this

PHP Code:
$id $_POST["id"];
$id preg_replace("/[^a-zA-Z0-9s]/"""$id);
$newname $_POST["newname"];
$newname preg_replace("/[^a-zA-Z0-9\\040.]/"""$newname); 
What do I need to include to filter these injections, Rsmiley?

Edit: Maybe this will protect it?

Adding this to functions.php:

PHP Code:
function cleanQuery($string)
{
  if(
get_magic_quotes_gpc())  // prevents duplicate backslashes
  
{
    
$string stripslashes($string);
  }
  if (
phpversion() >= '4.3.0')
  {
    
$string mysql_real_escape_string($string);
  }
  else
  {
    
$string mysql_escape_string($string);
  }
  return 
$string;

Then adding this line in rename2.php:

PHP Code:
if (isset($_POST['newname'])) $newname cleanQuery($_POST['newname']); 

What do you think Rsmiley?

It certainly does not hurt anything.
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysidia Adoptables v1.3.4[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 77 08-20-2020 02:58 PM
Mysidia Adoptables v1.3.1[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 109 08-24-2012 04:50 AM
Mysidia Adoptables v1.3.0[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 180 04-01-2012 10:16 PM
Mysidia Adoptables v1.2.3[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 38 10-29-2011 12:26 PM
Opinions and Suggestions (Security issue inside) nobackseat Feedback and Suggestions 13 02-07-2011 12:17 AM


All times are GMT -5. The time now is 06:39 PM.

Currently Active Users: 3405 (0 members and 3405 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636