quotes, spaces. Also move setting redirect to to where we actually do the redirect so that actions can remove the redirect if there was an error to report.
This commit is contained in:
parent
cc455e5d74
commit
284837d536
|
@ -98,7 +98,7 @@ if ( isset($_GET['skin']) ) {
|
|||
$skin = 'classic';
|
||||
}
|
||||
|
||||
if ( ! is_dir("skins/$skin") ) {
|
||||
if (!is_dir('skins/'.$skin) ) {
|
||||
$skins = array_map('basename', glob('skins/*', GLOB_ONLYDIR));
|
||||
|
||||
if ( !in_array($skin, $skins) ) {
|
||||
|
@ -183,9 +183,6 @@ $user = null;
|
|||
if ( isset($_REQUEST['view']) )
|
||||
$view = detaintPath($_REQUEST['view']);
|
||||
|
||||
if ( isset($_REQUEST['redirect']) )
|
||||
$redirect = '?view='.detaintPath($_REQUEST['redirect']);
|
||||
|
||||
# Add CSP Headers
|
||||
$cspNonce = bin2hex(zm_random_bytes(16));
|
||||
|
||||
|
@ -265,6 +262,8 @@ if ( ZM_OPT_USE_AUTH and (!isset($user)) and ($view != 'login') and ($view != 'n
|
|||
$request = null;
|
||||
}
|
||||
|
||||
if ( isset($_REQUEST['redirect']) )
|
||||
$redirect = '?view='.detaintPath($_REQUEST['redirect']);
|
||||
|
||||
if ( $redirect ) {
|
||||
ZM\Debug("Redirecting to $redirect");
|
||||
|
|
Loading…
Reference in New Issue