Skip to content

Commit

Permalink
If no view, default to home view
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Nov 23, 2024
1 parent 7fed03d commit 65e098c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@

# Add CSP Headers
$cspNonce = bin2hex(zm_random_bytes(16));
if (!$view) {
ZM\Debug(1, "Empty view, defaulting to home view");
$view = getHomeView();
}
if ( $includeFiles = getSkinIncludes('views/'.$view.'.php', true, true) ) {
ob_start();
CSPHeaders($view, $cspNonce);
Expand Down

0 comments on commit 65e098c

Please sign in to comment.