mediawiki,user-agent,googlebot , googlebot reading site in incorrect language


googlebot reading site in incorrect language

Question:

Tag: mediawiki,user-agent,googlebot

My site was hacked and the useragent is sending googlebot the incorrect page. It looks like it is reading it the wrong language as a result of the extra code:

dir="ltr" lang="ja" xml:lang="ja"> <head>
 <meta http-equiv="Content-Type" 
http-equiv="content-type" content="text/html; charset=UTF-8" />

I can't find where the code is in the files. It is a mediawiki site. How do I fix this?


Answer:

The hack was in the index.php file. I removed the code that was including a page created by the hackers.


Related:


How to compare string to String Array in C#?


c#,compare,user-agent,string-comparison
I have an string; String uA = "Mozilla/5.0 (iPad; CPU OS 8_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12D508 Twitter for iPhone"; String[] a= {"iphone","ipad","ipod"}; It must return ipad because ipad is in the first match ipad at the string. In other case String uA = "Mozilla/5.0 (iPhone/iPad;...

How does Composer know what MediaWiki extensions to load?


composer-php,mediawiki,semantic-mediawiki
We've switched from using Semantic Bundle to install extensions by using Composer. Now we can skip, for some extensions, manually including entry points at the LocalSettings.php file (http://www.bn2vs.com/blog/2013/11/24/introduction-to-composer-for-mediawiki-developers). But how does MediaWiki know which extensions to load. Does it read composer.json?

Nesting templates as part of a table is mysteriously eating a word in MediaWiki


templates,mediawiki,mediawiki-templates
When I use templates as individual lines in a table, it mostly seems to work perfectly, except for one spot where it keeps eating the first word of the second column, and I don't know why. Background: I have a small MediaWiki, just large enough to need several navigation lists,...

How to set User Agent in QtWebEngine QML application


qt,qml,qt5,user-agent,qtwebengine
NOTE: I was able to do that on QtWebKit QML using the QtWebView extension. Here I am interested in using QtWebEngine. My simple test application import QtQuick 2.1 import QtQuick.Controls 1.1 import QtWebEngine 1.0 ApplicationWindow { width: 800 height: 600 color: "lightgray" visible: true WebEngineView { id: webview url:...

wikipedia edit - how to “go to” the content of a subtitle?


mediawiki
In my wikipedia page, I have a subtitle called subtitleA. Before arriving at this point when reading, I have one sentence that has a link that jumps to the content of that subtitle. To be more clear, this is a simple illustration: To do this, you will need `this` (link...

Pretty URLs aren't working after upgrade to Mediawiki 1.24.2


.htaccess,ubuntu,mediawiki
So I am moving a Mediawiki site of mine to a new server. The version 1.20.3 worked fine on the old server running Ubuntu 12.04. However, when I copied everything over to my new server running Ubuntu 14.04 it didn't. So after messing with it for a while I decided...

How does MediaWiki sort page links in category overviews?


php,mediawiki,category,wiki,alphabetical
The answer should be: alphabetically. Currently, I have a page starting with 'A' appearing in the 'S' section of the category overview page. Screenshot: http://i.stack.imgur.com/pKide.jpg I have a small Wiki running for my team: MediaWiki 1.22.2 PHP 5.3.29 (litespeed) MariaDB 5.5.40-MariaDB and this is the first time I have ever...

How to not reveal a third party secret api key in MediaWiki


mediawiki,api-key,mediawiki-extensions
I've got an API key from themoviedb.org and I want to use it with the MediaWiki extension External Data. But if I put it as plain wikitext it will be in plain sight. Is there a simple way to add it as a custom variable in LocalSettings.php and then call...

Displaying edit count on MediaWiki


mediawiki,mediawiki-api,mediawiki-extensions
I would like to display number of edits / contribution on user page. Is there any way to do that? I tried to use link mentioned here: http://en.wikipedia.org/wiki/Help:User_contributions So if follow that, I got a URL something like this: http://ourdomain/api.php?action=query&list=users&ususers=MYUSERNAME&usprop=editcount And if I use it, it shows me a page...

how to use Piwik device detector in php project?


php,user-agent,piwik
i want to use php device detector that is part of famous Piwik project, but i can't understand how to include and use the code in my php code? i don't want to use composer. i wrote: <?php include 'DeviceDetector.php'; use DeviceDetector\DeviceDetector; use DeviceDetector\Parser\Device\DeviceParserAbstract; $dd = new DeviceDetector($_SERVER['HTTP_USER_AGENT']); $dd->parse(); $clientInfo...

What kind of CSS is this?


php,mediawiki
I was looking at an old installation of mediawiki which is not rendering css properly the code in the Chrome Dev Tools is showing CSS like this {{{border-width|1}}}px solid {{{titleborder|{{{border|#ababab}}}}}} Not able to understand what is the pre-processor used and why its not working. Can someone hint to some direction....

MediaWiki cant get LDAP authentication to work


linux,ldap,mediawiki
I am running out of ideas here. I cant get LDAP authentication to work on my network, i have a local machine (Linux Ubuntu 14 with mediawiki) Domain Name - XXXX Domain Controllers - OBI1.XXXX.local cg-p-dc-04.XXXX.local cg-p-dc-05.XXXX.local Here is my LocalSettings.php require_once "$IP/extensions/LdapAuthentication/LdapAuthentication.php"; $wgAuth = new LdapAuthenticationPlugin(); $wgLDAPDomainNames = array(...

Can I set different colours for content contributed by different users in MediaWiki?


mediawiki
Is there a way of assigning default colours for content contributed by different users in MediaWiki? For example, I would like to have content contributed by user A green by default, by user B blue by default etc....

Mediawiki: Error sending mail


php,email,mediawiki
I'm absolutely new to MediaWiki. I've installed it, set up smtp settings and trying to create a new user with sending him a password by email. But I'm getting the following error: Account creation error Error sending mail: Validation failed for: =?UTF-8?Q?=D0=92=D0=B8=D0=BA=D0=B8=20=D0=BC=D1=83=D0=B6=D1=81=D0=BA=D0=BE=D0=B3=D0=BE=20=D1=85=D1=80=D0=B8=D1=81=D1=82=D0=B8=D0=B0=D0=BD=D1=81=D0=BA=D0=BE=D0=B3=D0=BE=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D1=81=D1=82=D0=B2=D0=B0=20"=D0=9F=D1=83=D1=82=D1=8C"?= My email settings in LocalSettings.php...

Retrive first paragraph from Wikipedia in Chinese


mediawiki,wikipedia-api
I want to retrieve the first paragraph of Wikipedia in Chinese language. I found an API; http://en.wikipedia.org/w/api.php?action=query&prop=extracts&rawcontinue=1&format=xml&exintro=&titles=samsung but it returns data in English. How can I get data from this API in Chinese language?...

Mediawiki custom namespaces id change


namespaces,mediawiki,identifier
I am currently working on an internal Mediawiki and we are using a lot of custom written extensions. Because we did no know better, defined custom namespaces for our own extensions and articles with an id that is smaller than 3000. For example: define('NS_bla', 1100); $wgExtraNamespaces[NS_bla] = "bla"; define('NS_bla_TALK', 1101);...

What API does facebook use for displaying the full wikipedia articles?


facebook,mediawiki,wikipedia,wikipedia-api,mediawiki-api
I couldn't find any api that return the article in a usable html form. Most of them return extracts which have very poor HTML formatting which makes them useless for anything.

Wikipedia API - How to get all links from multiple pages?


mediawiki,wikipedia,wikipedia-api,mediawiki-api
I'm new to wiki api. I have read how to get all links from a specific page, and managed to do so, but in my case I need a list of links from many pages. And sending a request for each page is inefficient. This is the kind of request...

Convert docx to mediawiki and preserve [[Image:]]


converter,mediawiki,docx,libreoffice,soffice
Currently, I'm trying to move a docx to a mediawiki file and preserve the proper filenames in the [[Image:]] tags. For some reason, the proper image file gets swallowed (ie, normally it'd be media/image4.jpg, but instead it's just empty). I've tried extracting the docx and looking at docx/word/_rels/document.xml.rels but I...

urllib2 request returns a different page about 1 in 5 times


python,request,urllib2,user-agent
import urllib2 req = urllib2.Request('http://www.amazon.com/Sweet-Virgin-Organic-Coconut-13-5oz/dp/B00Q5CIL4Y', headers={ 'User-Agent': 'Mozilla/5.0' }) html = urllib2.urlopen(req).read() print len(html) That's the smallest example I can make. If you run that then ~1 in 5 times the length of the response will be 5769, and the other times it will be a normal usable response. Whats...

Check if mobile or not based on User Agent string [closed]


java,user-agent
One way to check could be based on the device width, but that definitely is not concrete. Are there any UA parsers/libraries to help identify this based on user agent string? Thanks!...

Can a form insert preformatted text within an existing Mediawiki page?


forms,mediawiki,mediawiki-extensions
I want unskilled users to be able to make a personal entry in a "Member Lookup" page, which I've implemented as a table in standard Mediawiki markup. I have a large userbase, most of which is not skilled Mediawiki editors. They all have edit permissions, just not skill or interest....

How do I add Special:PrefixIndex/FULLPAGENAME to the toolbox in my local MediaWIki installation?


javascript,mediawiki
I would like a tool in the sidebar's "Tools" section that takes readers to Special:PrefixIndex/FULLPAGENAME where FULLPAGENAME is replaced with the current page's full name. For example, say I was on the page Module:Citation/CS1 then I would like a tool in the sidebar called Subpages that takes me to Special:PrefixIndex/Module:Citation/CS1....

Restore MediaWiki site from physical files (MySQL)


mysql,linux,debian,mediawiki
One of our servers crashed last week and it wouldn't boot. So I got a full copy of the whole file system, and restored a previous backup. Now it is up and running, but there is a problem: the most recent changes made to a MediaWiki site were lost (the...

Change user agent for selenium driver


python,selenium,http-headers,user-agent
I have the following code in Python: from selenium.webdriver import Firefox from contextlib import closing with closing(Firefox()) as browser: browser.get(url) I would like to print the user-agent HTTP header and possibly change it. Is it possible?...

All my mediawiki pages are blank after PHP upgrade


php,mediawiki
Server Team upgraded PHP version to latest 5.6.5. Now All pages are blank. Could you please guide me how to resolve this. MediaWiki Version: 1.20.2 Thanks!

How to specify a default content in the text editor on MediaWiki page creation?


mediawiki,mediawiki-templates
On a MediaWiki, I would like that when someone creates a new page, the content of the text editor is automatically set to a certain value. For instance when one creates a new page called MyPage, the content of the text editor would be: Please modify this content and then...

Redirect based on operating system


javascript,wordpress,redirect,user-agent
I'm new here and I apologize if this question is basic/stupid. I am not too familiar with coding, so please excuse my ignorance/glaring errors. I have tried to put this together using code snippets found online and luckily I don't have to code too much for this project. I am...

MediaWiki page edit causes “Load denied by X-Frame-Options: does not permit cross-origin framing”


dns,mediawiki,frames
I am running a MediaWiki on a VM, accessing it through http://12.34.56.78/wiki -- I was able to edit pages. Now I've redirected my domain http://foo.org to http://12.34.56.78/wiki http://foo.org/wiki does indeed find my wiki, but when I attempt to edit a page I get a blank page. Inspecting the console yields:...

Testing for user agent spoofing in python


python,user-agent
I'm new to python and using python 3. I'm trying to download a webpage and what I want to know is if there is a way to actually see the name of the user agent the way a system admin or google sees it. In my code I download and...

Is it possible to continue numbering after inserting a table?


mediawiki
I want my list to show up as: 1. Step 1 2. Step 2: <table> 3. Step 3 but it shows up as: 1. Step 1 2. Step 2: <table> 1. Step 3 Code: # Step 1 # Step 2: :: {| ... |} # Step 3 Is it possible...

texvc does not render latex math in Mediawiki


latex,mediawiki,mediawiki-extensions
I have the Math extension installed in my MediaWiki 1.19. After I updated Ubuntu Server from 12.04 to 14.04 something seems to have messed it up and it has stopped working. Basically I get the following error when I try to display anything between the <math> and </math> tags: Failed...

MediaWiki 1.25 - show content for logged out users only


php,mediawiki
In my MediaWiki skin (Vector) I want to only show some content for logged out users. In the past I would do this with something like: <?php if( $wgUser->isAnon() ) { ?> <p>My content</p> <?php } ?> However, it appears that in MediaWiki 1.25 the $wgUser global has been deprecated....

Generate Get Request with No User Agent


asp.net,.net,google-chrome,browser,user-agent
I have a website that has been experiencing errors because of null references due to poorly coded logic regarding the user agent. Basically, there has been a slew of incoming requests that contain no user agent which leads to null reference exceptions in the user agent tracking. (It contained a...

Why use ImageMagick in CMS like MediaWiki instead of simply using browser methods?


imagemagick,mediawiki,graphicsmagick
Can somebody explain to me why I should possibly use ImageMagick (or the fork GraphicsMagick) in a CMS instead of simply displaying and sizing my images via CSS? The browser methods cannot fail and are automatically updated on client side, the ImageMagick-binary can fail on the server and I have...

How to login using mediawiki's api, curl, and bash?


bash,curl,mediawiki
My understanding of the process: From mediawikis login manual https://www.mediawiki.org/wiki/API:Login When using MediaWiki's web service API, you will probably need your application or client to log in. This involves submitting a login query, constructing a cookie, and confirming the login by resubmitting the login request with the confirmation token returned....

Change UserAgentString with Selenium Chrome


google-chrome,selenium,webdriver,user-agent
How do I, using Selenium (Python), change the UAS (User Agent String) on a webdriver.Chrome() Instance? I do automated tests, and use more than just Firefox. With firefox my quest is simple, but to get the same result on Chrome, i am at a loss....

HTML - How to show different image in different user agents?


javascript,html,user-agent
If I use Chrome I want to show img1.jpg (<img src="img1.jpg" alt="my Chrome Image">). Otherwise, if I use IE, I want to show img2.jpg (<img src="img2.jpg" alt="my IE Image">). Is it possible? Thanks in advance....

googlebot reading site in incorrect language


mediawiki,user-agent,googlebot
My site was hacked and the useragent is sending googlebot the incorrect page. It looks like it is reading it the wrong language as a result of the extra code: dir="ltr" lang="ja" xml:lang="ja"> <head> <meta http-equiv="Content-Type" http-equiv="content-type" content="text/html; charset=UTF-8" /> I can't find where the code is in the files....

List of User-agent for browser


c#,user-agent
Where can I find list of User-Agent which I can use in: webBrowser1.Navigate("http://localhost/run.php", null, null, "User-Agent: Here Put The User Agent"); Thank you for your reply....

Mediawiki Call hook function from another file


php,function,hook,mediawiki
Hello I need to save some content to database in MediaWiki when a new page is created. So I added hook in my LocalSettings.php: $wgHooks['PageContentSaveComplete'][] ='assign_responsibility'; But I need to call the function assing_responsibility() from a extension php file Responsibility.php not LocalSettings. I am new at Mediawiki system and I...

Where can I find the code that convert internal MediaWiki links into article URLs?


hyperlink,mediawiki,wikipedia,article
I need to replicate exactly, Wikipedia's behavior regarding the conversion of [[links]] in the page body to URLs that open the articles they refer to. The link syntax and its behavior (conversion) are described here. While that article only mentions a few very basic modifications being applied, I think that's...

About Airbnb video jumbotron for iPad


javascript,css,html5,frontend,user-agent
When visiting Airbnb from PC/MAC browsers, the homepage jumbotron will use HTML5 video as background even you resize browser to a quite small size (meaning it's not just media query). But when you use a tablet like iPad, the jumbotron will use image carousel instead. Is it something like user...

Can $_SERVER['HTTP_USER_AGENT'] contain '+' symbol?


php,user-agent
I was wondering if $_SERVER['HTTP_USER_AGENT'] can output user agents with a + instead of a space. I'm seeing a lot of votes being made in the voting system of my website, using a plus in the user agent, such as: Mozilla/5.0+(Windows+NT+6.2;+WOW64;+rv:33.0)+Gecko/20100101+Firefox/33.0 Mozilla/5.0+(Windows+NT+5.1;+U;+en)+Presto/2.10+Version/11.60 I suspect that this is some sort of...

Detect Chrome iPhone 6+


jquery,ios,user-agent,detect,iphone-6-plus
I used to use: (window.navigator.userAgent.indexOf('Android') > -1 && (/Chrome\/[.0-9]*/).test(window.navigator.userAgent)) || navigator.userAgent.match('CriOS'); to detect Chrome on iOS devices, but it appears the user agent on Chrome for the 6+ is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.53.11 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10 (000578) I've also used device.js in the past...

Hand over parameters from a MediaWiki template to a included one


mediawiki,mediawiki-extensions,mediawiki-templates
I'm using the MediaWiki extension DynamicPageList (third-party) which can be used as a template: {{#dpl: |category=foo |notcategory=bar }} I try to use this template in one of my templates which uses more parameter e.g.: {{myTemplate |category=foo |notcategory=bar |mypara1=bla |mypara2=lala }} myTemplate looks like this: do something with mypara1 ... do...

ASP.Net WebAPI has different content type in different user agents


c#,asp.net,rest,asp.net-web-api,user-agent
I am trying to learn ASP.Net WebAPI, and I am having a hard time figuring out what is going on. I created a small application that contains an action like this: public IHttpActionResult Hello() { return Ok("Hi"); } This works fine, so I look at it in the browser. I...

Prevent User Agent malicious code with PHP [closed]


php,wordpress,security,wordpress-plugin,user-agent
I have this PHP code, for a Wordpress plugin. How can I prevent user agent malicious code injection? I added if (preg_match('/script/',$agent)) { $agent = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $agent); for prevent only javascript malicious code, but is not enough for the other attacks. Someone suggested me to encode the html entities...

Perform a search using JSoup


java,html,jsoup,user-agent
Since the Soundcloud Java API is discontinued, I want to perform a search on their site using JSoup. I am currently using this code: Document doc = Jsoup .connect("https://soundcloud.com/search?q=deep%20house") .userAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36") .timeout(5000).get(); But the webpage is giving me a message that I...