[Openupload-svn-update] SF.net SVN: openupload:[337] branches/v0.4
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2009-08-28 11:43:58
|
Revision: 337
http://openupload.svn.sourceforge.net/openupload/?rev=337&view=rev
Author: tsdogs
Date: 2009-08-28 11:43:48 +0000 (Fri, 28 Aug 2009)
Log Message:
-----------
fix magic_quotes_gpc problems with strange user names and passwords.
Modified Paths:
--------------
branches/v0.4/lib/user.inc.php
branches/v0.4/www/setup.inc.php
Modified: branches/v0.4/lib/user.inc.php
===================================================================
--- branches/v0.4/lib/user.inc.php 2009-08-27 16:19:45 UTC (rev 336)
+++ branches/v0.4/lib/user.inc.php 2009-08-28 11:43:48 UTC (rev 337)
@@ -72,6 +72,11 @@
if (isset($_POST['username'])) {
$username = $_POST['username'];
$password = $_POST['pwd'];
+ if (ini_get('magic_quotes_gpc')) {
+ /* remove magic quoting from username and password */
+ $username = stripslashes($username);
+ $password = stripslashes($password);
+ }
}
if ($username != '') {
Modified: branches/v0.4/www/setup.inc.php
===================================================================
--- branches/v0.4/www/setup.inc.php 2009-08-27 16:19:45 UTC (rev 336)
+++ branches/v0.4/www/setup.inc.php 2009-08-28 11:43:48 UTC (rev 337)
@@ -403,6 +403,7 @@
$result[] = $d;
}
}
+ sort($result);
closedir($dir);
return $result;
}
@@ -454,6 +455,12 @@
msg('Though the application should work with this set please consider disabling it');
}
echo '<div id="message"><b>Optional Values</b></div>';
+ if (ini_get('magic_quotes_gpc')) {
+ msg('Magic Quotes: enabled','fail');
+ msg('It is strongly suggested to disable magic_quotes (which are deprecated now!)');
+ } else {
+ msg('Magic Quotes: disabled','ok');
+ }
if (function_exists('mysql_connect')) {
msg('MYSQL Support: exsists','ok');
} else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|