Skip to content
This repository was archived by the owner on Dec 6, 2019. It is now read-only.

Commit 89e65bb

Browse files
committed
Merge pull request #122 from equinoxmatt/master
SQL Injection fix
2 parents 99b5c14 + 42d9b35 commit 89e65bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: core/common/Auth.class.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ public static function ProcessLogin($useridoremail, $password)
255255
{
256256
$emailaddress = DB::escape($useridoremail);
257257
$sql = 'SELECT * FROM ' . TABLE_PREFIX . 'pilots
258-
WHERE email=\''.$useridoremail.'\'';
259-
}
258+
WHERE email=\''.$emailaddress.'\'';
259+
}
260260
# They're loggin in with a pilot id
261261
elseif(preg_match('/^([A-Za-z]*)(.*)(\d*)/', $useridoremail, $matches)>0)
262262
{
@@ -273,7 +273,7 @@ public static function ProcessLogin($useridoremail, $password)
273273
return false;
274274
}
275275
}
276-
276+
277277
$password = DB::escape($password);
278278
$userinfo = DB::get_row($sql);
279279

Diff for: core/common/PilotData.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ public static function getPilotGroups($pilotid)
951951
* @param int The pilot ID for which to generate a signature for
952952
* @return bool Success
953953
*/
954-
public function generateSignature($pilotid)
954+
public static function generateSignature($pilotid)
955955
{
956956
$pilot = self::getPilotData($pilotid);
957957
$pilotcode = self::getPilotCode($pilot->code, $pilot->pilotid);

0 commit comments

Comments
 (0)