Welcome, Guest
Username Password: Remember me

Conflict with unrecognised user agent strings
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Conflict with unrecognised user agent strings

Conflict with unrecognised user agent strings 12 years, 3 months ago #10867

  • openglobal
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
I've been using Mobile Joomla and Akeeba backup for some time, but today there has suddenly started to be a conflict between them.

I have a perl script that uses LWP::UserAgent to call:

www.example.com/index.php?option=com_akeeba&view=backup&key=#######&profile=1&format=raw

(where ####### is the password).

This is used to automate backups without having to manually log into the backend of the website and has been working fine for months. But today it failed because it's trying to redirect to one of the mobile subdomains instead.

The perl script uses the user agent string of "OpenGlobal". By changing this to "Mozilla/5.0 (X11; Linux i686; rv:10.0.1) Gecko/20100101 Firefox/10.0.1", it magically started working again.

How are unrecognised UA strings handled? It seems like unrecognised UA strings default to the first mobile subdomain.

OpenGlobal
Last Edit: 12 years, 3 months ago by openglobal.

Re: Conflict with unrecognised user agent strings 12 years, 3 months ago #10883

  • openglobal
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
I've just noticed that this is also affecting the W3C validator. Whenever I try to run my site through the validator, it gets redirected to the mobile site.

If you try running www.openglobal.co.uk through the validator at validator.w3.org, it gets redirected to mobile.openglobal.co.uk and tries to validate that instead.

This is looking like quite a major bug now.

OpenGlobal
Last Edit: 12 years, 3 months ago by openglobal.

Re: Conflict with unrecognised user agent strings 12 years, 3 months ago #10901

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
It's because of User-Agent header is not included into AMDD database, it will be fixed in next MJ release.

You can validate www.openglobal.co.uk?device=desktop to avoid redirection.

Re: Conflict with unrecognised user agent strings 12 years, 3 months ago #10902

  • openglobal
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
Are you saying that MJ now works by positive ID of desktops rather than positive ID of mobiles now?

If that's the case, I'll be uninstalling! An unrecognised user agent is a "desktop", not a mobile.

OpenGlobal

Re: Conflict with unrecognised user agent strings 12 years, 3 months ago #10903

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
 MJ initially use fast check for most popular desktop browsers (IE, Firefox, Chrome, Safari, Opera), and if only it's clear that visitor's browser is not belong to that group, MJ uses database (AMDD or Scientia) to find device type and capabilities using soft match method. W3C validator has User-Agent header "W3C_Validator/1.3", but the most closest entry in database is "W3C-mobileOK/DDC-1.0" (corresponding to W3C mobile validator). That's why W3C validator was detected as mobile device.

PS. MobileJoomla Pro with remote database detects W3C validator correctly, and AMDD database will be updated with next MJ release.

Re: Conflict with unrecognised user agent strings 12 years, 3 months ago #10905

  • openglobal
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
So what was matching the user agent "OpenGlobal" ?

Re: Conflict with unrecognised user agent strings 12 years, 3 months ago #10906

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
As there is no "OpenGlobal" in the database, it uses most closest (in the term of levenshtein distance) entry in the database: "OptusD736" (old phone with small 90x35px screen).

PS. I've never met "OpenGlobal" user agent in access logs, usually perl uses strings like "libwww-perl-5.160".

Re: Conflict with unrecognised user agent strings 12 years, 3 months ago #10907

  • openglobal
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
dryabov wrote:
I've never met "OpenGlobal" user agent in access logs, usually perl uses strings like "libwww-perl-5.160".


Exactly, it's completely made up, so it should default to "desktop", not mobile. "OpenGlobal" is completely different to "OptusD736" so it should not just assume it's a mobile. Two letters the same is not a close enough match, it must default to "desktop".

Why has this changed?

OpenGlobal

Re: Conflict with unrecognised user agent strings 12 years, 3 months ago #10908

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
Current algorithm allows to change (add/delete/replace) up to 12 characters to match.

Anyway, thanks for report, we are going to update current algorithm in next MJ release to be more smart in the case of short user-agent strings.

Re: Conflict with unrecognised user agent strings 12 years, 3 months ago #10909

  • openglobal
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
Is this a setting in the config? I can't find anything like that. That would probably be the best option for all users. Personally I'd want the most specific match (12+), but other users may want to default to mobile so 2 or 3 would be fine.

OpenGlobal
  • Page:
  • 1
  • 2
Time to create page: 0.10 seconds

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.