Where does GoogleCreativeContainerClass come from? - frontend

We are having an issue with the following div been injected into our site:
<div class="GoogleCreativeContainerClass" id="gcc_*****" data-creative-load-listener="">
It doesn't seem to break anything apart from ie9. It is getting injected in the middle of an SVG sprite sheet and breaking the SVGs.
I believe it's coming from GTM but we have 300 scripts loaded in via GTM!

Probably you resolve this already, however, and just in case, this is coming from any GTM tag which is displaying ads on your web site.
GTM is generating a list of data-dcm atributes that are used during the ad-render for each ad-placement you have configured.
The only way to avoid this is removing any specific ads that are displayed at your web site, when the browser is IE9 as you mentioned.

Related

CSP issue with iframe loaded from chrome extension

I'm developing a chrome extension that renders and sidebar iframe in Gmail.
A while back, we ran into a Content Security Policy issue that broke our extension and ran into a well-known error that shows up in your console as
Refused to frame '[OUR DOMAIN]' because it violates the following Content Security Policy directive: ...
To fix it, we had to rewrite the CSP header as explained in this blog post.
However, recently, we've been getting the same error, even after having implemented the fix suggested in the blog post.
As you can see, even though we added the chrome.webRequest.onHeadersReceived listener to overwrite the CSP header, our domain doesn't seem to be working. As a result, our sidebar does not load.
Notes and attempts:
Note that upon refreshing the entire page, the sidebar will sometimes load successfully %50 of the times, which leads me to believe that we're not adding the above event listener fast enough. To solve this, I pulled the event listener out of our background class and placed it at the top of the background js script. However, this issue seems to still persist.
We've tried to remove and re-add the extension but that didn't yield any permanent results.
Throughout testing, I also noticed that adding another extension that implements a similar override on the CSP header will cause our extension to break. Removing and re-adding our extension brings us back to the 50-50 issue in the first note.
[Update]
It seems that being able to reproduce it %50 of the times has to do with the version of chrome. After upgrading it to 72, I'm now able to reproduce the issue. However, doing a hard refresh on the page will sometimes allow the page to load.
More details on our setup: What we do is basically have a background.html which contains html templates and we have one template that contains an iframe tag. To get the template with the iframe, we do a sendMessage, grab the response, which is the template in string, convert it to DOM element via jquery, append it to body, and change the iframe's src attribute. What happens is the iframe loads fine initially, but when you click on any link in the iframe that would redirect to another page, the same error above shows up.
I can provide snippets and more info if needed.

how to load iframe using contentscript and override xframe

First of all, is there another built in way to do this like webview is in phonegap, so I can load an external site into a div or div like element. I know webview exists for chrome apps, but i couldn't find anything for extensions.
Basically i want to show preview of pages on links..
To do that I am trying to load urls of links using by setting src of iframes using content script. However, for most urls, I get an error that xframe not allowed.
what are my options.
xframe is pretty full proof, however, if you aren't referring to specifically an iframe, you could always use a web-proxy such as node-unblocker for node.js, or miniProxy for PHP.

Iframe resizer not resizing once site changed to ssl

I originally set this page up a few weeks ago, and it was working fine until the site went live and it was changed to ssl.
We've been in contact with the devs who made the page in the iframe, and got them to switch to ssl and made sure they have included the iframeResizer.contentWindow.min.js file on their end.
I've also been running a test from one of my other sites to make sure everything was been set up properly on my end, and that worked no problems.
Link to page with iframe: https://www.bedsrus.co.nz/sleep-selector
My test page used to check my setup: https://www.bedsrus.co.nz/test
Logging has been left on, if you'd like to have a look.
I've tried changing the heightCalculationMethod to to some other options including lowestElement, bodyScroll, and max.
There are a few warnings coming from the content page but I don't think they would be causing the problem.
Any help would be appreciated.
Managed to figure this one out.
The containing doc had the html and body elements set with height: 100%.
This was confusing the iframe resizer as some of the elements in the body were floating.
Setting the containing documents html and body elements to height: auto fixed this issue.
Just had a quick look and on https://www.bedsrus.co.nz/sleep-selector your using v1.4.4, where as the iframe is running the latest version of the script (v2.8.6)
Whilst this does work, you need the latest version on the both pages to use all the features of the current version.
The script isn't logging to the console on your test page.

html base tag with different domain from the top domain gives security issue

I've a website which displays and edits the contents of a different web pages like adding css codes to them.
It works like this, i use curl to get the contents of webpages then i edit the content and add base tag with href attribute which points the url that i got the contents of it. Then i put the edited content to an iframe on my website. It was working for a year, but yesterday i noticed an error that google chrome shows me the security warning page.
I've tried so many things to fix this problem but i couldn't fix it. when i use the base tag with different domain from the top domain, it shows the warning page. Do u have any idea how can a pass this problem. I have to use base tag with a different domain from the base tag.
It looks that was google side error :D We contact with them and the problem is fixed :)

Why is Chrome reporting a secure / non secure warning when no other browsers aren't?

When I go to our web site through HTTPS mode, Chome is reporting an error saying that the page contains secure and not secure items. However, I used Firebug, Fiddler, and HttpDebuggerPro, all which are telling me that everything is going through HTTPS. Is this a bug in Chrome?
Sorry but I'm unable to give out the actual URL.
A bit late to the party here but I've been having issues recently and once I had found a http resource and changed it was still getting the red padlock symbol. When I closed the tab and opened a new one it changed to a green padlock so I guess Chrome caches this information for the lifetime of the tab
Current versions of Chrome will show the mixed content's URL in the error console. Hit CTRL+Shift+J and you'll see text like:
"The page at https://www.fiddler2.com/test/securepageinsecureimage.htm contains insecure content from http://www.fiddler2.com/Eric/images/me.jpg."
I was having the same issue: Chromium showing the non-secure static files, but when everything was http://.
Just closing the current tab and re-opening the page in another new tab worked, so I think this is a Chromium/Chrome bug.
Cheers,
Diogo
Using Chrome, if you open up the Developer Tools (View > Developer > Developer Tools) and bring up the Console and choose to filter to warnings, you'll see a list of offending URLs.
You'll see something like the following if you do have insecure content
The page at https://mysite/ displayed insecure content from http://insecureurl.
For the best experience in finding the culprit, you'll want to start your investigation in a new tab.
It is possible that a non-secure URL is referenced but not accessed (e.g. the codebase for a Flash <object>).
I ran into this problem when Jquery was being executing a a few seconds after page load which added a class containing a non-secure image background. Chrome must continually to check for any non-secure resources to be loaded.
See the code example below. If you had code like this, the green padlock is shown in Chrome for about 5 seconds until the deferred class is applied to the div.
setTimeout(function() {
$("#some-div").addClass("deferred")
}, 5000);
.deferred
{
background: url(http://not-secure.com/not-secure.jpg"
}
Check the source of the page for any external objects (scripts, stylesheets, images, objects) linked using http://... rather than https://... or a relative path. Change the links to use relative paths, or absolute paths without protocol, i.e. href="/path/to/file".
If all that if fine, it could be something included from Javascript. For example, the Google Analytics code uses document.write to add a new script to the page, but it has code to check for HTTPS in case the calling page is secure:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
On the release of Chrome version 53 on Windows, Google has changed the trust indications to initiate the circle-i. Afterward, Google has announced a new warning message will be issued when a website is not using HTTPS.
From 2017 January Start, Popular web browser Chrome will begin
labeling HTTP sites as “Not Secure” [Which transmit passwords / ask
for credit card details]
If all your resources are indeed secure, then it is a bug. http://code.google.com/p/chromium/issues/detail?id=72015 . Luckily it was fixed.

Resources