im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.
I have roughly 30 files. I want to be able to edit every $_POST and $_GET
Code: [Select]$value=$_POST['value'];
$value=$_GET['value'];
my instinct would be to edit every file and do it manually
Code: [Select]$value=$_POST['value'];
$value=mysql_real_escape_string($value)
$value=$_GET['value'];
$value=mysql_real_escape_string($value)
but if there was a faster way it would make my life easier. What I would like to do is to maybe create a function i can put at the top of every page or into my global.php which is included into every page that would do something like this
Code: [Select]
if (get_magic_quotes_gpc()) {
$value = stripslashes($value);
}else{
$value=mysql_real_escape_string($value)
}
i dont intend to have magic quotes on, but other people might on there servers.
I just need every $_POST or $_GET within my script to be automaticly cleaned or filtered from SQL Injections
I saw something a long time ago where it was something they put at the top of there page, this will be completely wrong, but i will give u an example of what it looked like
Code: [Select]$_GET = array_map('mysql_real_escape_string', $_GET);
$_POST = array_map('mysql_real_escape_string', $_POST);
$_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
$_REQUEST = array_map('mysql_real_escape_string', $_REQUEST);
im not to sure how that goes about effecting everything, where to put it, etc
Any ideas or suggestions? Or am I stuck doing it manually.
$_GET problem
Hi all,Have a bit of a problem with a little piece of code, I am not sure if this should be under php or ajax as I am not sure where the problem lies. Basically here is the script:Code:
Different payment methods with different cross company requirements in F110
We are implementing SAP in a company in the shipping industry. They have the following requirement:
Date Format
Hi there,I have a date format like this right now:Sat, 17 Oct 2009 17:04:00 I need to turn that into:2009-10-17T17:04:00ZMy thought process was to remove with regex "Sat," and then just
add text and number image
hi guys ..ok see i want the user to add their name and pick a number then click get it and it prints the name on top and the number bellow it on a t-shirt i just cant seem to get this rite i have no
values in array being escaped
I would like to submit some values - back to the same form for checking before processing...Code: [Select]<FORM method="post"><table width="500px"
Mouseover to edit (Ajax)
hi friends, can anyone help with the code behind to get this application working, please in VB (new biz) <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
Slow data retrieval which requires improvement..please help
I am working on a Help Desk Ticketing system and have a page called MY TICKETS which shows all tickets in grids. the problem is that the number of records are around 30 to 40 but there is a lag
small inaccuracies
I have this code to convert fractional base 10 into base 2: while($num > 0) { echo "<tr><td>". $num." * 2 =
Sending a hyperlink through mail
HI all,
Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there is a way to track uploading with APC and php 5.2 + ?? any suggestions thanks