PDA

View Full Version : [Help] how i can repaier this code !!


random_X
05-10-2004, 08:15 AM
i was Have Uploading service Center work in VB2...



it is affined withe User membership ... But it is not work with VB3 and i think this from the VB auth connect file ..



look here



<?php

$auth = "false";

if (isset( $PHP_AUTH_ID ) && isset( $PHP_AUTH_PW )) {

mysql_connect( $checkservername, $dbcheckusername, $dbcheckpassword )

or die ( 'Unable to connect to server.' );

mysql_select_db( $dbcheckbase )

or die ( 'Unable to select database.' );

if ($encryptedpw) {

$chkpw = md5($PHP_AUTH_PW);

} else {

$chkpw = $PHP_AUTH_PW;

}

$sql = "SELECT * FROM user WHERE

userid = '$PHP_AUTH_ID' AND

password = '$chkpw' AND

(usergroupid = '2' or usergroupid = '5' or usergroupid = '6' or usergroupid = '7')";

$result = mysql_query( $sql )

or die ( 'Unable to execute query.' );

$num = mysql_numrows( $result );

if ( $num != 0 ) {

$auth = "true";

}

}

?>







Can any one help me to repaier this code ?!!

Xenon
05-10-2004, 09:42 AM
*moved*

passwords are doublehashed in vb3, not just singlehashed, as they were in vb2.

try to do a search, there have been some threads, which explained datailed, how the new pw encryption works :)