Hi community!
Have installed ZM 1.30.0 (from iconnor ppa) on ubuntu 16.04 lxc. Configure remote auth via Kerberos.
There's one serious issue.
As I can see ZM can save GET request when not logged in user come to the server and add it to the base URL (/zm/index.php) after logging in.
When I configure builtin auth - that's OK. I go to the - http://server_address/zm/index.php?view=montage&group=0 - and get username & password form. I enter my builtin username and pass, hit submit and get redirect to the page i navigate - http://server_address/zm/index.php?view=montage&group=0.
BUT when I configure remote auth and navigate the same URL Apache authenticates with my Kerberos ticket and redirect me to the http://server_address/zm/index.php. I have a feeling that postLoginQuery variable that saves GET request doesn't save it.
Can anyone help me with my problem?
Redirect with Remote auth
Re: Redirect with Remote auth
Hi to all again!
OK. When I use builtin auth it process me to the login form from /usr/share/zoneminder/www/skins/classic/views/login.php
It saves my GET request's path in variable and after success auth sent me to URL http://server_address/zm/index.php?view=montage&group=0.
Now I go to use remote auth. I realize that it doesn't use code from /usr/share/zoneminder/www/skins/classic/views/login.php AND it hasn't variable to save my GET request's path. So I go to /usr/share/zoneminder/www/skins/classic/skin.php and changeto
And now when I go to http://server_address/zm/index.php?view=montage&group=0 Apache authenticates me by Kerberos ticket and passes me to the montage page.
OK. When I use builtin auth it process me to the login form from /usr/share/zoneminder/www/skins/classic/views/login.php
It saves my GET request's path in variable and after success auth sent me to URL http://server_address/zm/index.php?view=montage&group=0.
Now I go to use remote auth. I realize that it doesn't use code from /usr/share/zoneminder/www/skins/classic/views/login.php AND it hasn't variable to save my GET request's path. So I go to /usr/share/zoneminder/www/skins/classic/skin.php and change
Code: Select all
if ( !isset($user) && ZM_OPT_USE_AUTH && ZM_AUTH_TYPE == "remote" && !empty( $_SERVER['REMOTE_USER']) )
{
$view = "postlogin";
$action = "login";
}
Code: Select all
if ( !isset($user) && ZM_OPT_USE_AUTH && ZM_AUTH_TYPE == "remote" && !empty( $_SERVER['REMOTE_USER']) )
{
$view = "postlogin";
$action = "login";
+ $_REQUEST['username'] = $_SERVER['REMOTE_USER'];
}