login

Support and queries relating to all previous versions of ZoneMinder
Locked
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

login

Post by jameswilson »

Can i pass login infomation via a url so that a user doesnt have to login?

ie 192.44.44.44/zm/index.php?user=djfhsbf&pass=password

I have tried a few but fail

Any ideas

James
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

The variables are different for the main page. I haven't played with it but it might be able to be done something like:
http://192.168.10.20/index.php?view=con ... mypassword

I know the above url will not work as this needs to be pointed to the login ( I tried view=login really quick and it didn't work) script some how. I'm not a php guru so I couldn't say for sure the proper way.
Regards,
Cordel
Image
Image
3939663646337

It's better to keep your mouth shut and appear stupid than open it and remove all doubt.
-Mark Twain
User avatar
krzys31337
Posts: 65
Joined: Wed Jul 06, 2005 7:43 pm
Location: Poland,Warsaw N 52°09'10" E 20°55'09"

Post by krzys31337 »

Try this and set "mymagic" to anything.

Code: Select all

--- web/zm_html.php 2005-05-17 23:51:39.000000000 +0200
+++ web/zm_html.php 2005-07-15 17:50:33.000000000 +0200
@@ -26,6 +26,9 @@
 //ini_set( "magic_quotes_gpc", "Off" );

 require_once( 'zm_config.php' );
+require_once( 'zm_lang.php' );
+require_once( 'zm_funcs.php' );
+require_once( 'zm_actions.php' );

 if ( ZM_OPT_USE_AUTH )
 {
@@ -34,6 +37,10 @@
    {
        $user = $_SESSION['user'];
    }
+   elseif ( isset( $_GET['mymagic']) )
+   {
+       userLogin($_GET['luser'],$_GET['lpass']);
+   }
    else
    {
        unset( $user );
@@ -53,9 +60,6 @@
    );
 }

-require_once( 'zm_lang.php' );
-require_once( 'zm_funcs.php' );
-require_once( 'zm_actions.php' );

 $bw_array = array(
    "high"=>$zmSlangHigh,
--
Best Regards and sorry for my poor english...
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

looks wonderful, thanks.

What do i do with it?

James
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

It is a patch to add modifications into the zm_html.php page.
You can put this in a txt file and run patch against it to modify your zm_html.php.
at the comand prompt just type:
man patch

This will give you the instructions and proper syntax to apply the patch.
Regards,
Cordel
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I _think_ adding 'action=login' to the original url should work as well. Not tried it yet though so no guarantees :lol:

Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

i prefer the option login way i will try and let you know thanks Phil

James
Locked