Skip to content

Conflicting regexes for Instacast #5792

@etienne-martin

Description

@etienne-martin

I found an issue with the way we detect Instacast. The regexes are conflicting.

As you can see the following regexes are very similar:

Feed readers:
Instacast/(\d+) CFNetwork/([\d\.]+)

Media players:
Instacast(?:/([\d\.]+))? CFNetwork/([\d\.]+)

Mobile apps:
Instacast(?:HD)?/(\d\.[\d\.abc]+) CFNetwork/([\d\.]+) Darwin/([\d\.]+)

For example, Instacast/2380 CFNetwork/720.2.4 Darwin/14.1.0 (x86_64) gets detected as a feed reader while it's a media player.

There seems to be an issue with the way the tests are executed because it's not getting caught by the tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions