Can't view event URL from email message (not logged in?)

Support and queries relating to all previous versions of ZoneMinder
Locked
dfaulkner
Posts: 14
Joined: Sun Jun 11, 2006 11:27 pm
Location: Fayetteville, AR
Contact:

Can't view event URL from email message (not logged in?)

Post by dfaulkner »

Hi all.

I've got ZM sending me emails & SMS when event criteria occur, but clicking on the link doesn't work. I get an error page:

Code: Select all

ZoneMinder Error
 
You do not have permissions to access this resource.
Please contact your adminstrator for details.
 
Close
Here are my settings:

Code: Select all

ZM_OPT_EMAIL: checked
ZM_EMAIL_BODY (contains a reference to %EPS%)
ZM_URL: https://somesite:8888/
The URL in my email looks like

Code: Select all

https://hostname:8888/?view=event&mode=stream&mid=2&eid=111
I'm guessing I need to log in somehow, since I've also got ZM_OPT_USE_AUTH set, but I'm not presented with a login box. Of course, I'm logged in in another window, so maybe something else is going on.

Am I missing something?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Best thing to do is create a user that can just view streams and add the login to the url:
https://hostname:8888/?view=event&mode= ... =something

Cheers,
Corey
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Does the url you are mailed work if you post it directly into your existing ZM window?
Phil
dfaulkner
Posts: 14
Joined: Sun Jun 11, 2006 11:27 pm
Location: Fayetteville, AR
Contact:

Post by dfaulkner »

zoneminder wrote:Does the url you are mailed work if you post it directly into your existing ZM window?
No, I get the same error.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Ok, I will look into this a bit further.
Phil
dfaulkner
Posts: 14
Joined: Sun Jun 11, 2006 11:27 pm
Location: Fayetteville, AR
Contact:

Post by dfaulkner »

dfaulkner wrote:
zoneminder wrote:Does the url you are mailed work if you post it directly into your existing ZM window?
No, I get the same error.
OK, I take it back. I didn't understand your question at first.

Yes, if I paste the URL into a already authenticated ZM window, I'm taken straight to the event, just like I should be. So, I guess it's authentication.

I don't really like Corey's suggestion (no offense!), but I'm nervous about putting account credentials into a URL, much less into an email. Is there another way?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

I don't really like Corey's suggestion (no offense!), but I'm nervous about putting account credentials into a URL, much less into an email. Is there another way?
If you use a restriced account then its more or less irrelevant. How do you want to login to the system, you will need to pass some sort ot auth if its automatic
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
dfaulkner
Posts: 14
Joined: Sun Jun 11, 2006 11:27 pm
Location: Fayetteville, AR
Contact:

Post by dfaulkner »

jameswilson wrote:How do you want to login to the system, you will need to pass some sort ot auth if its automatic
Well, I was sortof expecting to click the link, get redirected to an authentication page, log in, and get redirected back to the origninal URL. (I have no idea how hard this would be to impliment, of course ;) My theory is that in case someone stumbles across the email with the URL, they would have no access--a login still protects things.

It all depends on what the target purpose of the system is, I suppose.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

oh i see. I can understand it if you need to log in and thought that was how it worked if you were not currently logged in, but i havnt used this feature since 1.21.3 i think.
I assumed you wanted to get straight in without auth but you and only you lol

JAmes
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I am looking into this issue as various people have reported it. It's been a long time since I used it and I suspect it may be a bit borked :lol:
Phil
Locked