Skip to content

Commit 55b99e1

Browse files
Use a redirect on homeview to fix having query params added on
1 parent 4c4ae60 commit 55b99e1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

web/index.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,16 @@
250250
return;
251251
}
252252

253-
# Add CSP Headers
254-
$cspNonce = bin2hex(zm_random_bytes(16));
255253
if (!$view) {
256254
ZM\Debug(1, "Empty view, defaulting to home view");
257255
$view = getHomeView();
256+
header('Location: ?view='.$view);
257+
return;
258258
}
259+
260+
# Add CSP Headers
261+
$cspNonce = bin2hex(zm_random_bytes(16));
262+
259263
if ( $includeFiles = getSkinIncludes('views/'.$view.'.php', true, true) ) {
260264
ob_start();
261265
CSPHeaders($view, $cspNonce);

0 commit comments

Comments
 (0)