Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alvaber-DVWA2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alvaber
alvaber-DVWA2
Commits
52dc94b8
Commit
52dc94b8
authored
Sep 28, 2019
by
Robin Wood
Browse files
Options
Downloads
Patches
Plain Diff
fixing up undefined and double defined variables
parent
1d4136af
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
dvwa/includes/DBMS/MySQL.php
+3
-1
3 additions, 1 deletion
dvwa/includes/DBMS/MySQL.php
login.php
+7
-1
7 additions, 1 deletion
login.php
setup.php
+7
-1
7 additions, 1 deletion
setup.php
with
17 additions
and
3 deletions
dvwa/includes/DBMS/MySQL.php
+
3
−
1
View file @
52dc94b8
...
...
@@ -6,7 +6,9 @@ This file contains all of the code to setup the initial MySQL database. (setup.p
*/
if
(
!
defined
(
'DVWA_WEB_PAGE_TO_ROOT'
)
)
{
define
(
'DVWA_WEB_PAGE_TO_ROOT'
,
'../../../'
);
}
if
(
!@
(
$GLOBALS
[
"___mysqli_ston"
]
=
mysqli_connect
(
$_DVWA
[
'db_server'
],
$_DVWA
[
'db_user'
],
$_DVWA
[
'db_password'
]
))
)
{
dvwaMessagePush
(
"Could not connect to the MySQL service.<br />Please check the config file."
);
...
...
This diff is collapsed.
Click to expand it.
login.php
+
7
−
1
View file @
52dc94b8
...
...
@@ -9,7 +9,13 @@ dvwaDatabaseConnect();
if
(
isset
(
$_POST
[
'Login'
]
)
)
{
// Anti-CSRF
checkToken
(
$_REQUEST
[
'user_token'
],
$_SESSION
[
'session_token'
],
'login.php'
);
if
(
array_key_exists
(
"session_token"
,
$_SESSION
))
{
$session_token
=
$_SESSION
[
'session_token'
];
}
else
{
$session_token
=
""
;
}
checkToken
(
$_REQUEST
[
'user_token'
],
$session_token
,
'login.php'
);
$user
=
$_POST
[
'username'
];
$user
=
stripslashes
(
$user
);
...
...
This diff is collapsed.
Click to expand it.
setup.php
+
7
−
1
View file @
52dc94b8
...
...
@@ -11,7 +11,13 @@ $page[ 'page_id' ] = 'setup';
if
(
isset
(
$_POST
[
'create_db'
]
)
)
{
// Anti-CSRF
checkToken
(
$_REQUEST
[
'user_token'
],
$_SESSION
[
'session_token'
],
'setup.php'
);
if
(
array_key_exists
(
"session_token"
,
$_SESSION
))
{
$session_token
=
$_SESSION
[
'session_token'
];
}
else
{
$session_token
=
""
;
}
checkToken
(
$_REQUEST
[
'user_token'
],
$session_token
,
'setup.php'
);
if
(
$DBMS
==
'MySQL'
)
{
include_once
DVWA_WEB_PAGE_TO_ROOT
.
'dvwa/includes/DBMS/MySQL.php'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment