Redirect to Setup.php
cixtor opened this issue · 2 comments
cixtor commented
It would be great a redirection to the file setup.php
if the installation process was not started. I have this little piece of code checking in the information schema database if the table users exists in the database specified in the configuration file.
Only works with MySQL database.
$ diff login.php login.php.fork
22a23,31
> $users_exists_q = @mysql_query("SELECT table_schema, table_name, create_time
> FROM information_schema.tables
> WHERE table_schema='{$_DVWA['db_database']}' AND table_name='users'
> LIMIT 1");
> if( !mysql_fetch_assoc($users_exists_q) ){
> header('Location: setup.php');
> exit;
> }
>
ethicalhack3r commented
Good idea! I'll implement it next time I work on DVWA.