Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-44829

User Agent detection does not detect chrome browser on android 4.1.2 and above as android

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.5, 2.6.2, 2.7.3, 2.8
    • Fix Version/s: 2.7.4, 2.8.2
    • Component/s: Libraries
    • Labels:

      Description

      Browser sniffing does not detect android 4.1.2 and above as android
      Chrome has been default browser on android since around 4.1.2
      The user agent changed, the device detection in 2.5.5 / 2.6 does not correctly detect android devices using chrome and android 4.1.2

      2.5.5 fix:
      moodlelib.php line 8949
      from:
      if (strpos($agent, 'Linux; U; Android') === false) {
      to:
      if (strpos($agent,'Linux; Android') === false && strpos($agent, 'Linux; U; Android') === false) {

      2.6.2 fix
      useragent.php line 750
      from:
      if (strpos($useragent, 'Linux; U; Android') === false) {
      to:
      if (strpos($useragent,'Linux; Android') === false && strpos($useragent, 'Linux; U; Android') === false) {

      OR
      if (strpos($useragent, 'Android') === false) {

      to catch firefox on android as well

        Attachments

          Activity

            People

            Assignee:
            berserkk Ben Kelada
            Reporter:
            berserkk Ben Kelada
            Peer reviewer:
            Andrew Lyons Andrew Lyons
            Integrator:
            Dan Poltawski Dan Poltawski
            Tester:
            Dan Poltawski Dan Poltawski
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              12/Jan/15