Skip to content
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 #2

Open
ghost opened this issue Jan 26, 2011 · 3 comments
Open

Security Error #2

ghost opened this issue Jan 26, 2011 · 3 comments

Comments

@ghost
Copy link

ghost commented Jan 26, 2011

Hi there,

I am working with nude.js to scan a series of images from Flickr. Now everything goes just fine up to the point where I call nude.scan. With that line I get the following security error in Chrome:

Uncaught Error: SECURITY_ERR: DOM Exception 18

And in Firefox:

Security error" code: "1000
http://www.local.com/labs/nude/js/nude.min.js
Line 1

Searched around a bit and found an entry on Stackoverflow that mentions the following:
"Error 1000 usually means you are trying to change something in the DOM which is not allowed." - http://goo.gl/zP1kl

I have tried running this via just plain http://localhost as well as mapped a domain name www.local.com to 127.0.0.1 using the hosts file but, in both cases I get the security error.

Also created a Fiddle you can check out here: http://jsfiddle.net/ossreleasefeed/Crzz3/

@demian85
Copy link

demian85 commented Feb 6, 2011

This error is because you cannot call getImageData() on a canvas that contains an image form another domain. I don't know how to bypass this security error but is really silly since I cannot scan images from other sites.

Info: http://code.google.com/p/chromium/issues/detail?id=49150

@ghost
Copy link
Author

ghost commented Feb 6, 2011

I thought as much, would be awesome to find a way to do this cross domain. I will do some experimentation and let you know if I find something.

@vikasTmz
Copy link

Use --allow-file-access-from-files flag on launching chrome.
Eg on linux terminal: google-chrome --allow-file-access-from-files.

Hopefully not too late :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants