Some security fixes.

This commit is contained in:
eirik committed 2010-02-01 19:07:04 +01:00
1 parent 39f5683bcb
commit 2a4b4a328f
4 files changed
+7 -7

No files matched your search

+4 -4
View File
@@ -7,10 +7,10 @@ print('<?xml version="1.0" encoding="ISO-8859-1"?'.'>');
$conn = db_connect();
$action = $_REQUEST['action'];
$action = mysql_real_escape_string($_REQUEST['action']);
if ($action == 'checkZip'){
$zip = $_REQUEST['zip'];
$zip = mysql_real_escape_string($_REQUEST['zip']);
if ($zip != "") {
$sql = "SELECT poststed AS postarea
FROM din_postnummer
@@ -72,7 +72,7 @@ if ($action == 'checkZip'){
printRemoveCatXML($type);
}else if ($action == 'checkUsername') {
$username = $_REQUEST['username'];
$username = mysql_real_escape_string($_REQUEST['username']);
$conn = db_connect("forum");
$sql = sprintf("SELECT user_id FROM phpbb_users u "."WHERE username_clean = '%s' ", strtolower($username));
$result = & $conn->query($sql);
@@ -114,4 +114,4 @@ function printRemoveCatXML($type){
<?php
}
?>
?>
+1 -1
View File
@@ -7,7 +7,7 @@ header("Content-type: application/xml");
$conn = db_connect();
$zip = $_REQUEST['zip'];
$zip = mysql_real_escape_string($_REQUEST['zip']);
$sql = "SELECT poststed AS postarea
FROM din_postnummer
+1 -1
View File
@@ -69,7 +69,7 @@ function scriptParam($name) {
}
else
if (isset ($_POST[$name])) {
$val = $_POST[$name];
$val = mysql_real_escape_string($_POST[$name]);
}
else
if (isset ($_GET[$name])) {
+1 -1
View File
@@ -8,7 +8,7 @@ header("Content-type: application/xml");
$conn = db_connect();
$posId = $_REQUEST['positionid'];
$posId = mysql_real_escape_string($_REQUEST['positionid']);
$sql = "SELECT name, text
FROM din_position