Skip to content

Commit f5c8f29

Browse files
author
ture2307
committed
Correction to prevent injection from Cookie
1 parent af42bd1 commit f5c8f29

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dvwa/includes/dvwaPage.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ function &dvwaPageNewGrab() {
190190

191191

192192
function dvwaThemeGet() {
193-
if (isset($_COOKIE['theme']) && in_array($_COOKIE['theme'], ['dark', 'light'])) {
194-
return $_COOKIE[ 'theme' ];
193+
if (isset($_COOKIE['theme']) && $_COOKIE['theme'] === 'dark') {
194+
return 'dark';
195195
}
196196
return 'light';
197197
}

0 commit comments

Comments
 (0)