dvwa updated
This commit is contained in:
parent
8f3c3af4fb
commit
c37af6fc80
84 changed files with 1873 additions and 605 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
if( isset( $_GET[ 'Change' ] ) ) {
|
||||
// Checks to see where the request came from
|
||||
if( eregi( $_SERVER[ 'SERVER_NAME' ], $_SERVER[ 'HTTP_REFERER' ] ) ) {
|
||||
if( stripos( $_SERVER[ 'HTTP_REFERER' ] ,$_SERVER[ 'SERVER_NAME' ]) !== false ) {
|
||||
// Get input
|
||||
$pass_new = $_GET[ 'password_new' ];
|
||||
$pass_conf = $_GET[ 'password_conf' ];
|
||||
|
|
@ -10,12 +10,12 @@ if( isset( $_GET[ 'Change' ] ) ) {
|
|||
// Do the passwords match?
|
||||
if( $pass_new == $pass_conf ) {
|
||||
// They do!
|
||||
$pass_new = mysql_real_escape_string( $pass_new );
|
||||
$pass_new = ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $pass_new ) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : ""));
|
||||
$pass_new = md5( $pass_new );
|
||||
|
||||
// Update the database
|
||||
$insert = "UPDATE `users` SET password = '$pass_new' WHERE user = '" . dvwaCurrentUser() . "';";
|
||||
$result = mysql_query( $insert ) or die( '<pre>' . mysql_error() . '</pre>' );
|
||||
$result = mysqli_query($GLOBALS["___mysqli_ston"], $insert ) or die( '<pre>' . ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)) . '</pre>' );
|
||||
|
||||
// Feedback for the user
|
||||
$html .= "<pre>Password Changed.</pre>";
|
||||
|
|
@ -30,7 +30,7 @@ if( isset( $_GET[ 'Change' ] ) ) {
|
|||
$html .= "<pre>That request didn't look correct.</pre>";
|
||||
}
|
||||
|
||||
mysql_close();
|
||||
((is_null($___mysqli_res = mysqli_close($GLOBALS["___mysqli_ston"]))) ? false : $___mysqli_res);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue