I'm getting spam when I load //pagead2.googlesyndication.com/pagead/js/adsbygoogle.js - adsense

When I load <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>, images on my page get replaced with spam ads of all kinds.
I'm testing bare bones in a guest instance of chrome on my pc.
This is the original code:
<html>
<head>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
</head>
<body>
<img src="/images/ads/mm-mug-wide.jpg" />
</body>
</html>
These are screen shots of the network log with and without the adsense javascript. By the time I killed it, the network log with adsense showed 455 requests over 35 minutes.
With Adsense Javascript: https://18103791804392046531.googlegroups.com/attach/1841b7c6b6b0b5/adsense-network-log-with-adsense.jpg?part=0.3&view=1&vt=ANaJVrFCJMUV-pol5F7XFKcts8bc50qnvFbazg6PVlZXCOCj7PSJXGBJQkoZaU9AzQcs7xh0VS03Q8-pCS9c9iErGlhHCP3mkSWUMeMumfeQPkKkWpanUDU
Without Adsense Javascript: https://18103791804392046531.googlegroups.com/attach/1841b7c6b6b0b5/adsense-network-log-without-adsense.jpg?part=0.2&view=1&vt=ANaJVrHGcOCztReWJmK09Yr0YpkouhCZwxFzmmjfRfk2wyB0Rr9vb30Hl7SkanKF06LcCCxDvElQx4tB_ZQYRxB-96zOY8gXEp_IjL6q6pOzlsSuA4-nQZ8
UPDATE:
It only seems to do it if the word 'ad' or 'ads' ('header' was not a match) appear in the src. If the class is 'ad', it starts loading the spam resources but does not replace the image or continue on indefinitely.

The DNS on my router had been altered to point to a malicious DNS that was rerouting things such as google adsense.

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-6483687610557857",
enable_page_level_ads: true
});
</script>

Related

Adsense - We found that your site is down or unavailable

It's my first time to try adsense in a site I made from scratch
I tried to add adsense to my website over 10 times and everytime it says:
We found that your site is down or unavailable:
And the code provided is already in the <head></head> section of the website
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-2733350805802981",
enable_page_level_ads: true
});
</script>
website : https://www.a3traf.com

Tableau Web Data Connector hosted in a Cloud Platform getting stuck in infinite loop

I have this TWDC(tableau web data connector) app hosted on our company's private cloud.
Every app that are deployed there are accessed after the user logs in via a Single Sign On login page, then redirected to the app.
When I try to use my web data connector on my Tableau Desktop it gets stuck on an infinite loop, after i push the button which does tableau.submit().
I've set the debugger and found out, that when I push the button, the page that is loaded is not the index.html of my WDC but the redirect page from the SSO login.
I have no idea why is this happening, doesn't make much sense, because it loaded the index.html in the first place, but after i push this button it gets back to somewhere in the middle of SSO login and redirect page.
Just a note: It works fine on the simulator.
Any thougths on this?
Here's my code:
HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>TableauAngular</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<script type="text/javascript" src="assets/js/jquery.min.js"></script>
<script type="text/javascript" src="assets/js/tableauwdc-2.3.latest.js"></script>
<script type="text/javascript" src="controller.js"></script>
</head>
<body>
<button id="submitButton">Send</button>
<br />
<br />
<textarea id="log" style="border: 1px solid #000; width: 100%; height: 700px;"></textarea>
<br />
<div id="placeholder"></div>
</body>
</html>
JavaScript
$(document).ready(function() {
try {
$("#submitButton").click(function() { tableau.submit() });
var myConnector = tableau.makeConnector();
// these are function which are not important for this question;
myConnector.getSchema = fnGetSchema;
myConnector.getData = fnGetData;
tableau.registerConnector(myConnector);
} catch (e) {
logger("ERROR: " + JSON.stringify(e));
}
});
This isn't a problem with your code. With the WDC there is an interactive phase where the user is shown a screen and can interact (this is your first SSO sign-in) but then there is a non-interactive (Get Data) phase where Tableau will try to retrieve the data and never shows the SSO login to the user. See docs. Given this page is loaded without user interaction it can't/shouldn't have SSO security on it.

Facebook Login pop-up domains, ports, and protocols must match

No matter what I do I get repeated javascript errors in chrome after the facebook-login box pops up.
I am using just the bare minimum login script provided on the FB example site. I've googled this till I'm blue in the face and can't seem to find a solution that actually works for the current version of the Javascript API. Here's my code:
My Facebook Login Page
</head>
<body>
<div id="fb-root"></div>
<script>
FB.init({
appId:'MYAPPID', cookie:true,
status:true, xfbml:true,
channelUrl:'http://www.MYDOMAIN.com/channel.html'
});
</script>
<fb:login-button>Login with Facebook</fb:login-button>
</body>
I of course have MyAPPID and myDomain with the proper info.
Any help/insight would be appreciated as this is driving me nuts and I have quite a few hours into it. Thanks all!

registration-url parameter fails for fb:login-button if oauth 2.0 is enabled

I'm trying to get the registration flow for Facebook login working. Here's a bare-bones example:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>My Facebook Login Page</title>
</head>
<body>
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
<div id="fb-root"></div>
<script type="text/javascript">
FB.init({
appId:'xxxxxxxxxxx',
cookie:true,
status:true,
xfbml:true,
channelUrl : 'http://<myWebSite>/channel.html',
oauth:true
});
</script>
<fb:login-button registration-url="http://<myWebSite>/register"/>
</body>
</html>
(The only things I've replaced above are the website and the appID)
If I try it like this, the login button shows up, but clicking it causes FireBug to report 'Unknown status: undefined' in the browser log. If I remove the 'oauth=true' line though, it works. I'm trying to adhere to the new oauth 2.0 standard, so I'd like to leave it in. Has anyone else run into this? Seems like if this was a bug, it would have been caught pretty early on.
the 'registration-url' parameter is no longer supported by , take a look in the documentation of it. http://developers.facebook.com/docs/reference/plugins/login/
Just check if the user is logged in via the JS-SDK

How can I register facebook users on my site ?

I am trying to find a walk through on how to register users via facebook onto my site.
The facebook developers site keeps confusing me and I was hoping there where easier tutorials to follow.
Stephen,
It can be a little complicated.
You have to combine the documentation at:
http://developers.facebook.com/docs/guides/web/
http://developers.facebook.com/docs/plugins/registration/
Boiling it down to the simplest case:
<html>
<head>
<title>My Facebook Registration Page</title>
</head>
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js">
</script>
<script>
FB.init({
appId:'yourAppID', cookie:true,
status:true, xfbml:true
});
</script>
<fb:registration
fields="[{'name':'name'}, {'name':'email'},
{'name':'favorite_car','description':'What is your favorite car?',
'type':'text'}]" redirect-uri="Your processing URL">
</fb:registration>
</body>
</html>
Facebook will return an encrypted form field with all the user data called "signed Request" You will need to decrypt this field with your secret key. There is an PHP example at the bottom of http://developers.facebook.com/docs/plugins/registration/