#612 ✓resolved

http://randomurl#.user.js triggers script installation

Reported by snowled | April 19th, 2012 @ 12:53 PM

Provide the following information:

  1. Your operating system (and version)
    Some kind of x86 linux

  2. Your browser (and version)
    Firefox 11.0

  3. The version of Scriptish you are using

  4. Your language and/or locale (e.g. "en-US")

  5. Clear steps to reproduce the bug (including a reduced-case user script, if applicable)
    Visit http://s.imgur.com/images/imgur-small.gif?lol=.user.js
    Visit http://s.imgur.com/images/imgur-small.gif#.user.js

  6. Any error messages seen in the Error Console

  7. A description of what you expected to happen
    The image is displayed in the browser.

  8. A description of what actually happened
    The image is displayed in the browser and an "install this script?" dialog pops up.

There are two bugs here:

  1. The "extension" of the document is .gif, not .user.js.

    • Query parameters should be ignored when checking for .user.js.
    • Fragment anchors should be ignored when checking for .user.js.
  2. This isn't even text. Script installation should only trigger if the Content-Type indicates javascript (i.e. one of text/plain, text/javascript, application/x-javascript, application/javascript, application/ecmascript).

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket