File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 62
62
}
63
63
64
64
$ phpIdsHtml = 'PHPIDS is currently: ' ;
65
+
66
+ // Able to write to the PHPIDS log file?
67
+ $ WarningHtml = '' ;
68
+
65
69
if ( dvwaPhpIdsIsEnabled () ) {
66
70
$ phpIdsHtml .= '<em>enabled</em>. [<a href="?phpids=off">Disable PHPIDS</a>] ' ;
71
+
72
+ # Only check if PHPIDS is enabled
73
+ if ( !is_writable ( $ PHPIDSPath ) ) {
74
+ $ WarningHtml .= "<div class= \"warning \"><em>Cannot write to the PHPIDS log file</em>: $ {PHPIDSPath}</div> " ;
75
+ }
67
76
}
68
77
else {
69
78
$ phpIdsHtml .= '<em>disabled</em>. [<a href="?phpids=on">Enable PHPIDS</a>] ' ;
72
81
// Anti-CSRF
73
82
generateSessionToken ();
74
83
75
- // Able to write to the PHPIDS log file?
76
- $ WarningHtml = '' ;
77
- if ( !is_writable ( $ PHPIDSPath ) ) {
78
- $ WarningHtml .= "<div class= \"warning \"><em>Cannot write to the PHPIDS log file</em>: $ {PHPIDSPath}</div> " ;
79
- }
80
-
81
-
82
84
$ page [ 'body ' ] .= "
83
85
<div class= \"body_padded \">
84
86
<h1>DVWA Security <img src= \"" . DVWA_WEB_PAGE_TO_ROOT . "dvwa/images/lock.png \" /></h1>
You can’t perform that action at this time.
0 commit comments