Weird Error related to skins.js immediately after login

Forum for questions and support relating to the 1.30.x releases only.
Locked
jsylvia007
Posts: 116
Joined: Wed Mar 11, 2009 8:32 pm

Weird Error related to skins.js immediately after login

Post by jsylvia007 »

Howdy all! I recently needed to rebuild my ZM server (Physical to Virtual migration).

I learned 2 things... Even if your virtual environment hosts your NAS directly and you have a 10GB connection between the hosts, NAS mounted via NFS capable of 200MBps sustained write isn't fast enough for ZM. I needed to create a VMDK (virtual disk - that happens to be stored on said NAS) and it worked ok... I tried before with just an NFS mount and its wasn't fast enough, resulted in a bunch of ring buffer overflows.

Now to my current issue. Immediately after login, I get this in the error log. It doesn't seem to cause any issues and everything works, but it does place an ERR in the log, which cause the log link to go red, meaning I usually check it to ensure that the system is performing optimally.

Anyone have any ideas?

Code: Select all

ERR	Uncaught SecurityError: Blocked a frame with origin "https://my.domain.tld" from accessing a cross-origin frame.	https://my.domain.tld/zm/skins/classic/js/skin.js	167
(Note actual domain removed for security's sake.
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Weird Error related to skins.js immediately after login

Post by iconnor »

Are you sure you have edited the domain correctly?

What is the url you are using to access ZM?
jsylvia007
Posts: 116
Joined: Wed Mar 11, 2009 8:32 pm

Re: Weird Error related to skins.js immediately after login

Post by jsylvia007 »

Howdy. Interesting...

So... I have an internal "management" webpage setup for my home environment. That site runs on the server "webserver". Zoneminder runs on the server "zoneminder".

I use a link on "webserver" to pass me over to "zoneminder"...

If I access the server directly, from a fresh browser session, the error isn't there...
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Weird Error related to skins.js immediately after login

Post by iconnor »

Yeah... so you are doing cross-domain browsing, which is generally considered to be suspicious. Hence the error.

What you can do is make an entry under the servers tab of options... and put an entry for "webserver" with "webserver" as the url field. This will tell Zoneminder to set some headers saying "Allow from webserver".
jsylvia007
Posts: 116
Joined: Wed Mar 11, 2009 8:32 pm

Re: Weird Error related to skins.js immediately after login

Post by jsylvia007 »

So... I went into there, and added:

"server.domain.tld" into both the name and hostname fields (no http/https).

No change. Still get the error.

I added just "server" (or webserver in this case of generals) in both, and my log was spammed with:

2016-12-20 11:35:53.184130 web_php 15472 WAR https://zoneminder.domain.tld is not found in servers list. /usr/share/zoneminder/www/includes/functions.php
jsylvia007
Posts: 116
Joined: Wed Mar 11, 2009 8:32 pm

Re: Weird Error related to skins.js immediately after login

Post by jsylvia007 »

So!! Is it possible that it's this re-write rule I have in my apache config on the zoneminder server??

In the <VirtualHost *:80> section I have:

RewriteEngine on
ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
RedirectMatch ^/$ /zm/

and in my <VirtualHost *:443> section, I have:
<Location />
SSLRequireSSL On
SSLOptions +StdEnvVars +StrictRequire +FakeBasicAuth
RedirectMatch ^/$ /zm/
</Location>
jsylvia007
Posts: 116
Joined: Wed Mar 11, 2009 8:32 pm

Re: Weird Error related to skins.js immediately after login

Post by jsylvia007 »

More info... I accessed with Edge and got a different error:

Code: Select all

2016-12-20 12:06:13.848381	web_js		25007	ERR	Permission denied	https://zoneminder.domain.tld/zm/skins/classic/js/skin.js	167
20
That's related to this function from the script:

Code: Select all

function refreshParentWindow()
{
    if ( window.opener )
        window.opener.location.reload( true ); <-- this is line 167
}
Additionally, here is the code that opens the zoneminder page from "webserver.domain.tld":

Code: Select all

<a href="https://zoneminder.domain.tld/zm/" target="_blank">ZoneMinder</a>
robfish
Posts: 30
Joined: Wed May 16, 2018 11:24 pm

Re: Weird Error related to skins.js immediately after login

Post by robfish »

iconnor wrote: Tue Dec 20, 2016 4:22 pm What you can do is make an entry under the servers tab of options... and put an entry for "webserver" with "webserver" as the url field. This will tell Zoneminder to set some headers saying "Allow from webserver".
Thanks. I hadn't worried about this in the past but the "fix" was quick and easy.
Locked