Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#2537 closed defect (fixed)

Don't assume "Chrome/" to be given in the user agent string

Reported by: sebastian Assignee: sebastian
Priority: P3 Milestone: Adblock-Plus-1.9-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

http://codereview.adblockplus.org/4726788198498304

Description

Observed behaviour

In chrome/ext/background.js we detect Chrome >=38, to apply a workaround for https://crbug.com/410382. Therefore the user agent string is parsed, assuming the Chrome version is given after the string Chrome/. However, this code fails on platforms that implement the Chrome extension API but use a different user agent string.

Expected behaviour

The code should consider that case and skip the version comparison and workaround on those platforms.

Change History (5)

comment:1 Changed 5 years ago by sebastian

  • Owner set to sebastian
  • Summary changed from Don't assume "Chrome/" to be in the user agent string to Don't assume "Chrome/" to be given in the user agent string

comment:2 Changed 5 years ago by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:3 Changed 5 years ago by sebastian

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:4 Changed 5 years ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next

comment:5 Changed 5 years ago by sebastian

Also see #2573. Apparently the old behavior also caused issues on Chrome,
when using the --user-agentcommand line switch.

Note: See TracTickets for help on using tickets.