Web service user-agent string blocking reminder

I would like to remind Web Service users that on 16 November we’re going to block generic User-Agent strings from accessing our web service. Earlier we said:

The User-Agent string needs to identify the application and the version of the application that is making the request; having a generic User-Agent string like “Java/1.6.0_24″ or “PHP/5.3.4″ does not allow us to properly identify the application making the requests.

IMPORTANT: 6 Months after we release NGS (Nov 16th) we’re going to start blocking common generic User-Agents strings, so please make sure that you send us a proper User-Agent header as part of your request.

You have been warned. :)

9 Responses to “Web service user-agent string blocking reminder”

  1. patate12 says:

    Are the userjs concerned by this block ? I guess current user agents might be something like Opera/9.80 (Windows NT 5.1; U; en) Presto/2.9.168 Version/11.52 (depending on the browser).
    Are these allowed ?

  2. mayhem says:

    patate12: No, it should not. The blocking will be for /ws/1 and /ws/2

  3. Nikki says:

    Or to answer the actual question, no, we’re not planning to block browser UA strings.

  4. Paul C. Bryan says:

    I’m looking at libwebservice-musicbrainz-perl, (Query.pm:130) which sets the User-Agent header to “WebService::MusicBrainz/0.93″. There are no hooks for applications to modify the User-Agent header in this library. Will this library be at risk?

  5. patate12 says:

    Thanks for the answers ! I’ve been unworried. :)

  6. mayhem says:

    Paul: No we’re not going to block those. First we need to add support for setting user agent strings in all of our client libs. Then we’ll need to allow the generic strings like this one for at least a year before we start blocking those. I’m working on a comprehensive plan for all of this now.

  7. Does this affect pymusicbrainz? Getting this with a script that uses 0.7.3 now:

    Couldn’t fetch release: HTTP Error 400: Bad Request

  8. Mayhem says:

    Andrew: If that problem persists, its a bug and you should open a ticket for it.

  9. The solution is to replace:

    q = Query(service)

    with:

    q = Query(ws=service, clientId=”gen_encoding-0.2″)

    i.e. set a clientid.