New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

security error on Firefox 7.0.x #36

Closed
dhaval2025 opened this Issue Oct 3, 2011 · 16 comments

Comments

Projects
None yet
5 participants
@dhaval2025

dhaval2025 commented Oct 3, 2011

Spin.js errors out on firefox 7.0.x , it error out on line 64 saying Security error '}', 0);

NB: I am trying to use spin.js within an iframe

Thanks
Dhaval

@fgnass

This comment has been minimized.

Show comment
Hide comment
@fgnass

fgnass Oct 5, 2011

Owner

Can you send me a link to an example?
Is the content of your iframe loaded from the same domain as spin.js?

Owner

fgnass commented Oct 5, 2011

Can you send me a link to an example?
Is the content of your iframe loaded from the same domain as spin.js?

@dhaval2025

This comment has been minimized.

Show comment
Hide comment
@dhaval2025

dhaval2025 Oct 5, 2011

Hey I am sorry but I don't have a public link yet, but I can tell you that the iframe url is www.Adomain.com,

but all the markup, scripts and stylesheets within the iFrame load from www.Bdomain.com.

Also this works great on chrome and ie7+

dhaval2025 commented Oct 5, 2011

Hey I am sorry but I don't have a public link yet, but I can tell you that the iframe url is www.Adomain.com,

but all the markup, scripts and stylesheets within the iFrame load from www.Bdomain.com.

Also this works great on chrome and ie7+

@dhaval2025

This comment has been minimized.

Show comment
Hide comment
@dhaval2025

dhaval2025 Oct 11, 2011

Update::

Hi,
Just wanted to give you an update that It hasn't been working on any firefox, Till now I was just trying on 7.0.x but I just tried on other Firefox versions and haven been getting the same security error on Line 64 of spin.js

Thanks
Dhaval

dhaval2025 commented Oct 11, 2011

Update::

Hi,
Just wanted to give you an update that It hasn't been working on any firefox, Till now I was just trying on 7.0.x but I just tried on other Firefox versions and haven been getting the same security error on Line 64 of spin.js

Thanks
Dhaval

@runtalan

This comment has been minimized.

Show comment
Hide comment
@runtalan

runtalan Oct 13, 2011

I'm also having the same issue.

I think this is happening on Line 58 for me -- with respect to "sheet.insertRule"

It looks like a Cross-Domain issue. In my specific case, my JS/CSS are hosted on CDN (different domain).

runtalan commented Oct 13, 2011

I'm also having the same issue.

I think this is happening on Line 58 for me -- with respect to "sheet.insertRule"

It looks like a Cross-Domain issue. In my specific case, my JS/CSS are hosted on CDN (different domain).

@fgnass

This comment has been minimized.

Show comment
Hide comment
@fgnass

fgnass Oct 14, 2011

Owner

Hm, I wonder if inserting <style type="text/css">/* CSS rules here */</style> would make any difference.

Owner

fgnass commented Oct 14, 2011

Hm, I wonder if inserting <style type="text/css">/* CSS rules here */</style> would make any difference.

@fgnass

This comment has been minimized.

Show comment
Hide comment
@fgnass

fgnass Oct 18, 2011

Owner

Hi everyone! Could you please try this again with the current HEAD? It contains a fix for issue #39 which is probably related to this error.

I noticed that in FF documents.styleSheets[documents.styleSheets.length-1] always is the Firebug CSS (if installed), which might also explain the security error. If that's the case, the patch for issue #39 should fix this, too.

Owner

fgnass commented Oct 18, 2011

Hi everyone! Could you please try this again with the current HEAD? It contains a fix for issue #39 which is probably related to this error.

I noticed that in FF documents.styleSheets[documents.styleSheets.length-1] always is the Firebug CSS (if installed), which might also explain the security error. If that's the case, the patch for issue #39 should fix this, too.

@fgnass fgnass referenced this issue Oct 18, 2011

Merged

Fix for issue #39 #40

@runtalan

This comment has been minimized.

Show comment
Hide comment
@runtalan

runtalan Oct 18, 2011

While it fixes the error in Firefox, this creates a new issue in Safari.

. line: 61
. message: "'undefined' is not an object (evaluating 'sheet.insertRule')"
. sourceId: 4743268672
. sourceURL: "http://localhost/lib/Javascript/spin.js"

runtalan commented Oct 18, 2011

While it fixes the error in Firefox, this creates a new issue in Safari.

. line: 61
. message: "'undefined' is not an object (evaluating 'sheet.insertRule')"
. sourceId: 4743268672
. sourceURL: "http://localhost/lib/Javascript/spin.js"

@fgnass

This comment has been minimized.

Show comment
Hide comment
@fgnass

fgnass Oct 18, 2011

Owner

Unfortunately I still can't reproduce this issue. Viewing example.html (from the master branch) works in Safari (5.1.1) even if I load spin.js from another domain (raw.github.com vs. localhost) or include an external stylesheet. @phishbot Any chance you could post a link to a non-working example?

Owner

fgnass commented Oct 18, 2011

Unfortunately I still can't reproduce this issue. Viewing example.html (from the master branch) works in Safari (5.1.1) even if I load spin.js from another domain (raw.github.com vs. localhost) or include an external stylesheet. @phishbot Any chance you could post a link to a non-working example?

@eych

This comment has been minimized.

Show comment
Hide comment
@eych

eych Oct 28, 2011

One more idea how this can be fixed — 974cdd3#commitcomment-681824

eych commented Oct 28, 2011

One more idea how this can be fixed — 974cdd3#commitcomment-681824

fgnass added a commit that referenced this issue Oct 29, 2011

@fgnass

This comment has been minimized.

Show comment
Hide comment
@fgnass

fgnass Oct 29, 2011

Owner

I pushed another version to the master branch which uses the sheet or styleSheet property of the inserted style element. Still needs some more cross-browser testing. Let me know whether this works for you.

Owner

fgnass commented Oct 29, 2011

I pushed another version to the master branch which uses the sheet or styleSheet property of the inserted style element. Still needs some more cross-browser testing. Let me know whether this works for you.

@runtalan

This comment has been minimized.

Show comment
Hide comment
@runtalan

runtalan Nov 4, 2011

This is still an issue for me in Firefox 7.0; it works fine in Firefox 3.6 , Chrome, and Safari.

You can see it broken here:

http://beta.tumblecloud.com/cloudpage/?cloud=438

runtalan commented Nov 4, 2011

This is still an issue for me in Firefox 7.0; it works fine in Firefox 3.6 , Chrome, and Safari.

You can see it broken here:

http://beta.tumblecloud.com/cloudpage/?cloud=438

@runtalan

This comment has been minimized.

Show comment
Hide comment
@runtalan

runtalan Nov 5, 2011

One note : it works if you have Firebug up, but is broken without it.

runtalan commented Nov 5, 2011

One note : it works if you have Firebug up, but is broken without it.

@runtalan

This comment has been minimized.

Show comment
Hide comment
@runtalan

runtalan Nov 5, 2011

here is another test link which is more accurate
http://unstable.dev.tumblecloud.com/cloudpage/?cloud=4705&

runtalan commented Nov 5, 2011

here is another test link which is more accurate
http://unstable.dev.tumblecloud.com/cloudpage/?cloud=4705&

@eych

This comment has been minimized.

Show comment
Hide comment
@eych

eych commented Nov 5, 2011

@phishbot http://unstable.dev.tumblecloud.com/lib/Javascript/spin.js doesn't seem to contain the fix from 930bae7

@runtalan

This comment has been minimized.

Show comment
Hide comment
@runtalan

runtalan Nov 7, 2011

woops! it looks like it did fix all our issues with it. Thanks eych!

runtalan commented Nov 7, 2011

woops! it looks like it did fix all our issues with it. Thanks eych!

fgnass added a commit that referenced this issue Nov 8, 2011

Merge branch 'master' into gh-pages
* master:
  Defaults are now exposed as Spinner.defaults
  Added float:left for #preview
  Possible fix for issue #36
  Wrapped the code into a function expression to keep the local scope tidy
  fix for issue #39
@christianhaller

This comment has been minimized.

Show comment
Hide comment
@christianhaller

christianhaller commented Nov 8, 2011

thx

@fgnass fgnass closed this Nov 8, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment