[ 
https://issues.apache.org/jira/browse/GUACAMOLE-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17152331#comment-17152331
 ] 

Mike Jumper commented on GUACAMOLE-1127:
----------------------------------------

{quote}
I have a guacamole web application with an extension that [generalizes 
document.domain|https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#Changing_origin]
 to facilitate same-origin conditions with another subdomain.

When I do this, there is a javascript error "Cannot read property defaultView 
of null" pointing to 
[guacamole-client/guacamole/src/main/webapp/app/element/directives/guacResize.js:98|https://github.com/apache/guacamole-client/blob/d1e928bea79ca81c827e9b6adedabc98eefdf701/guacamole/src/main/webapp/app/element/directives/guacResize.js#L98].
 I assume that the resize listener is no-longer same-origin after modifying the 
parent document's domain, so contentDocument is inaccessible.
{quote}

Sounds possible, though I don't immediately see why this would be the case. The 
{{guacResize}} directive adds an {{<object>}} which points to an HTML file that 
is part of the web application. If the web application can be used at all, it 
should certainly be able to access its own HTML.

{quote}
What is the motivation for having an object element as a resize listener?
{quote}

{{<object>}} is the only HTML element which universally fires resize events 
whenever its own size changes, even if those changes are not due to changes in 
browser window size. It is the only way to receive resize events which are 
accurate and reliable across all platforms.

> dynamic resize sensor breaks on domain alteration
> -------------------------------------------------
>
>                 Key: GUACAMOLE-1127
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-1127
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole-client
>    Affects Versions: 1.2.0
>         Environment: Chrome Version 83.0.4103.116 (Official Build) (64-bit)
> MacOS Mojave 10.14.6
>            Reporter: Monty Thibault
>            Priority: Minor
>
> I have a guacamole web application with an extension that [generalizes 
> document.domain|https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#Changing_origin]
>  to facilitate same-origin conditions with another subdomain.
> When I do this, there is a javascript error "Cannot read property defaultView 
> of null" pointing to 
> [guacamole-client/guacamole/src/main/webapp/app/element/directives/guacResize.js:98|https://github.com/apache/guacamole-client/blob/d1e928bea79ca81c827e9b6adedabc98eefdf701/guacamole/src/main/webapp/app/element/directives/guacResize.js#L98].
>  I assume that the resize listener is no-longer same-origin after modifying 
> the parent document's domain, so contentDocument is inaccessible.
> What is the motivation for having an object element as a resize listener? 
> Thanks!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to