Fixed
Status Update
Comments
ra...@gmail.com <ra...@gmail.com> #3
Example 1. Just trying to attach your gmaps script.
If you open the developer console, you will see that gmaps init script is loaded, but "getScript("https://maps.gstatic.com/intl/en_us/mapfiles/api-3/9/8/main.js ");" line isn't working, there is no new script in the document after document.write.
If you open the developer console, you will see that gmaps init script is loaded, but "getScript("
d....@gtempaccount.com <d....@gtempaccount.com> #4
Example 2. Trying to use callback parameter. Init is loaded, main javascript file is loaded too. But not working, exception screenshot is in attach.
ra...@gmail.com <ra...@gmail.com> #5
For example 2 - your code:
...
lf.main = function(a) {
eval(a); // <-- Uncaught Error: Code generation from strings disallowed for this context
};
...
...
lf.main = function(a) {
eval(a); // <-- Uncaught Error: Code generation from strings disallowed for this context
};
...
mi...@gmail.com <mi...@gmail.com> #6
Just to poke this bug, using the asynchronous loading method has no effect on this. The only workaround is to roll back to manifest version 1 which is actively being phased out.
d....@gtempaccount.com <d....@gtempaccount.com> #7
Switched to Yandex Maps, it works well.
Thank you!
Thank you!
pa...@gmail.com <pa...@gmail.com> #8
As manifest version 1 won't be accepted by the Chrome Webstore starting in mid August, we really do need a workaround/fix.
ra...@gmail.com <ra...@gmail.com> #9
As I discovered a few minutes ago, manifest version 1 is no longer accepted by the Chrome store *now*. So setting the manifest version to 1 and using 'unsafe-eval' in the CSP no longer works for new extensions.
Updating existing extensions may still be supported.
Updating existing extensions may still be supported.
pa...@gmail.com <pa...@gmail.com> #10
New packaged apps having manifest version 1 are no longer supported.
Please fix this issue as soon as possible.
Thanks
Please fix this issue as soon as possible.
Thanks
ra...@gmail.com <ra...@gmail.com> #11
According to deprecation schedule only new items should be affected (for now). For existing items there will be issues starting approximately in November.
Source:http://code.google.com/chrome/extensions/manifestVersion.html
Source:
an...@gmail.com <an...@gmail.com> #12
Oh new fun fact, relating to this: With Chrome 21 you can only install apps/extensions from the Chrome Store. So not I have an extension I can't deploy to the Chrome Store nor can I push it to my clients directly :(.
Please fix
Please fix
th...@gmail.com <th...@gmail.com> #13
This is killing now. Can you provide an alternate way to connect to http://maps.google.com/maps/api/js?sensor=false . Thanks
th...@gmail.com <th...@gmail.com> #14
Any updates on this issue or how can we resolve it. If google app cannot support there on google map, that really bad..
Please provide an alternate or a solution ASAP.
Please provide an alternate or a solution ASAP.
th...@gmail.com <th...@gmail.com> #15
Hi all,
A workaround has been released by the Chrome team:
http://code.google.com/chrome/extensions/trunk/sandboxingEval.html
I've attached a sample extension that makes use of this sandboxing technique. To use any of the Chrome extension APIs (e.g. tabs), you'll need to use postMessage to communicate to the popup or background page.
A workaround has been released by the Chrome team:
I've attached a sample extension that makes use of this sandboxing technique. To use any of the Chrome extension APIs (e.g. tabs), you'll need to use postMessage to communicate to the popup or background page.
ra...@gmail.com <ra...@gmail.com> #16
Thank you for the yet another ugly and useless butthurt for developers.
I load my own content and to draw a map I need to sandbox the dangerous google maps api from my page to iframe. Great.
I load my own content and to draw a map I need to sandbox the dangerous google maps api from my page to iframe. Great.
sa...@gmail.com <sa...@gmail.com> #17
I don't wish to be rude, but this remains a significant problem.
th...@gmail.com <th...@gmail.com> #18
Berry,
I'd like an official Map event handler from Google as well, but for now, mine is the
best solution. You might call it pathetic kludge, but at least it works in all
browsers--yours does not. I'd say mine is the only non-pathetic kludge on this page.
I'd like an official Map event handler from Google as well, but for now, mine is the
best solution. You might call it pathetic kludge, but at least it works in all
browsers--yours does not. I'd say mine is the only non-pathetic kludge on this page.
fr...@gmail.com <fr...@gmail.com> #19
A similar issue also breaks Packaged Apps! The gmaps api uses document.write(), which is not available in packaged apps. So importing https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false still throws an error. Everyone knows document.write() is bad practice; that the Google Maps API forces you to use it is appalling.
ra...@gmail.com <ra...@gmail.com> #20
Sorry - tlc. I realize mine is a kludge. I called it such in comment #10 . I was
not aware it did not work in some browsers.
Please tell me in which browsers it fails:
http://www.polyarc.us/polycluster/event.html
Thanks very much.
not aware it did not work in some browsers.
Please tell me in which browsers it fails:
Thanks very much.
th...@gmail.com <th...@gmail.com> #21
Any hints about that?
pa...@gmail.com <pa...@gmail.com> #22
I have uploaded a small testcase to help debugging this: https://gist.github.com/icoloma/7934269
Disabling 'unsafe-eval' makes the test fail.
Disabling 'unsafe-eval' makes the test fail.
ra...@gmail.com <ra...@gmail.com> #23
[Comment deleted]
th...@gmail.com <th...@gmail.com> #24
Here is a permanent fix for document.write
try {
document.write('<' + 'script src="' + src + '"' + ' type="text/javascript"><' + '/script>');
} catch (e) {
var mapRequest = document.createElement("script"),
type = (isNaN(document.xmlVersion) === true || document.contentType.indexOf("application") === 0) ? "application" : "text";
mapRequest.setAttribute("type", type + "/javascript");
mapRequest.setAttribute("src", src);
document.getElementsByTagName("body")[0].appendChild(mapRequest);
}
document.write is purely legacy. Google Chrome does not even recognize the existence of document.write in certain strict rendering modes. Try this against a file with extention ".xhtml".
The code I provided will continue to support document.write as the default method, but when it fails the error will be suppressed and the valid approach that works in all browsers will be applied instead.
There is absolutely no reason to continue using document.write instead of this code here. I recommend just removing document.write though.
Bug 4081 can be merged into this issue.
try {
document.write('<' + 'script src="' + src + '"' + ' type="text/javascript"><' + '/script>');
} catch (e) {
var mapRequest = document.createElement("script"),
type = (isNaN(document.xmlVersion) === true || document.contentType.indexOf("application") === 0) ? "application" : "text";
mapRequest.setAttribute("type", type + "/javascript");
mapRequest.setAttribute("src", src);
document.getElementsByTagName("body")[0].appendChild(mapRequest);
}
document.write is purely legacy. Google Chrome does not even recognize the existence of document.write in certain strict rendering modes. Try this against a file with extention ".xhtml".
The code I provided will continue to support document.write as the default method, but when it fails the error will be suppressed and the valid approach that works in all browsers will be applied instead.
There is absolutely no reason to continue using document.write instead of this code here. I recommend just removing document.write though.
th...@gmail.com <th...@gmail.com> #25
It has been almost 2 years since this has been opened. Can someone tell me why this is still an issue? What is the status report google?
ra...@gmail.com <ra...@gmail.com> #26
If you want to load that JS file without document.write, set the callback parameter like so:
http://maps.google.com/maps/api/js?sensor=false&callback=googleCallback
You'll see that it loads the js with a different getScript function:
function getScript(src) {
var s = document.createElement('script');
s.src = src;
document.body.appendChild(s);
}
You'll see that it loads the js with a different getScript function:
function getScript(src) {
var s = document.createElement('script');
s.src = src;
document.body.appendChild(s);
}
po...@gmail.com <po...@gmail.com> #27
Can someone give a clear example on how to load google maps correctly? This issue has to be solved by now.
th...@gmail.com <th...@gmail.com> #28
[Comment deleted]
po...@gmail.com <po...@gmail.com> #29
To help us evaluate fixing this issue, are these issues with CSP purely in the context of Chrome extensions, or use of CSP generally on the web (through use of the Content-Security-Policy header)?
th...@gmail.com <th...@gmail.com> #30
I included a gist at #23 with a failing test for a normal website (i.e. no Chrome plugin)
sy...@gmail.com <sy...@gmail.com> #31
Has there been any update here?
Allowing 'unsafe-eval' is a deal-breaker, and far from ideal.
Allowing 'unsafe-eval' is a deal-breaker, and far from ideal.
ap...@google.com <ap...@google.com> #32
As the last comment was in May 2015: this is *STILL* an issue.
It basically requires every public website (not even an 'extension' which needs to use the hackish sandboxing stuff) that utilizes a proper CSP header to include 'unsafe-eval' and a very long list of image sources too.
The eval() usage is still in the API. As others noted, after more than two years, maybe time to drop usage of Google Maps API, as it makes sites insecure.
It basically requires every public website (not even an 'extension' which needs to use the hackish sandboxing stuff) that utilizes a proper CSP header to include 'unsafe-eval' and a very long list of image sources too.
The eval() usage is still in the API. As others noted, after more than two years, maybe time to drop usage of Google Maps API, as it makes sites insecure.
ap...@google.com <ap...@google.com> #33
This issue is on our roadmap. It's clear that CSP is important, and is indeed a deal-breaker.
This won't be simple for us to fix. We'll keep everyone posted with our progress.
This won't be simple for us to fix. We'll keep everyone posted with our progress.
ra...@gmail.com <ra...@gmail.com> #34
This is insane - Google Maps is incompatible with Google Apps. The sandboxing technique is not viable for me. I'm going to have to use a different map tool in my Chrome app.
pe...@gmail.com <pe...@gmail.com> #35
hmm this totally sucks... people with template solutions like smarty will totaly bomb if they want to integrate a remote apis... i presume some how templaters like smarty inline the javascript codes and links from the template files... utterly diabolical google chrome cant use google maps api? and templaters cant load there apis :(
ra...@gmail.com <ra...@gmail.com> #36
[Comment deleted]
ra...@gmail.com <ra...@gmail.com> #37
The problem is bigger then you realize :(
This should be the solution for web developers but of course as per usual chrome fails to come correct at the critical hurdle.. img-src .. and please feel free to put me straight if you know why this is or what I might of done wrong.
The snippet bellow is to get leaflet map working for instance *not even google maps* every thing works and seems to make sense untill img-src fowls up.
<meta http-equiv="Content-Security-Policy" content="
default-srchttp://mydomain.com/jobtracker ;
connect-srchttp://mydomain.com http://*.mapbox.com/ ;
font-srchttp://mydomain.com http://*.mapbox.com/ data:;
frame-srchttp://mydomain.com http://*;
img-src http://* data: filesystem: blob:;
media-srchttp://mydomain.com http://*;
object-srchttp://mydomain.com http://mapbox.com ;
script-src 'unsafe-inline' 'unsafe-eval'http://mydomain.com http://*;
style-src 'unsafe-inline'http://mydomain.com http://*;
" />
Can you fix it please google!! ;(
I should invoice google for the loss of productivity...
forgive me for being kind of sick of these security features that google keeps asserting on to us each time forgetting or overlooking something trivial but important and thus setting our projects weeks and causing regressions
This should be the solution for web developers but of course as per usual chrome fails to come correct at the critical hurdle.. img-src .. and please feel free to put me straight if you know why this is or what I might of done wrong.
The snippet bellow is to get leaflet map working for instance *not even google maps* every thing works and seems to make sense untill img-src fowls up.
<meta http-equiv="Content-Security-Policy" content="
default-src
connect-src
font-src
frame-src
img-src http://* data: filesystem: blob:;
media-src
object-src
script-src 'unsafe-inline' 'unsafe-eval'
style-src 'unsafe-inline'
" />
Can you fix it please google!! ;(
I should invoice google for the loss of productivity...
forgive me for being kind of sick of these security features that google keeps asserting on to us each time forgetting or overlooking something trivial but important and thus setting our projects weeks and causing regressions
ra...@gmail.com <ra...@gmail.com> #38
Just so you all know even with the `CSP disable extension` activated you still need to provide a full CSP header with every single remote resource white listed to have a hope in hell of dealing with this I even changed my whole setup to SSL and it still persists so please do explain to me how a SSL connection can be man in the middle'd????
to...@gmail.com <to...@gmail.com> #39
Comment has been deleted.
lu...@google.com <lu...@google.com>
ac...@gmail.com <ac...@gmail.com> #40
[Comment deleted]
Description
mousemove
mouseover
mouseout
events for the map canvas for independent mouse tracking.