Closed Bug 669555 Opened 15 years ago Closed 15 years ago

Diff-Viewer: Fragment URIs should not contain the plain text file path and name

Categories

(addons.mozilla.org Graveyard :: Admin/Editor Tools, defect, P4)

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: nmaier, Unassigned)

Details

(Whiteboard: [ReviewTeam])

Currently the diff-viewer makes XHR requests like this: GET /en-US/firefox/files/browse/122983/fragment/chrome.manifest HTTP/1.1 However, having the file path and name as part of the fragment URI might cause interference from various tools, such as extensions implementing nsIContentPolicy, e.g. Adblock Plus or Greasemonkey/Scriptish, or https-proxies implementing some kind of blacklist (security appliances). It hence would be better to add the requested fragment file path to the request using some other method, such as another custom header, a post request or whatever
You named possible pain points, but is there something in particular that's actually blocking you?
This bug came up in a discussion in the editors internal list, because Scriptish blocks *.user.js scripts in the file diff viewer. It shouldn't be too difficult to work around it.
Severity: normal → minor
Priority: -- → P4
It sounds like a bug on their side, not on ours. Putting the filename in the URL is the only thing that makes sense to me. Otherwise we become a busted PHP site from the 90s.
+1 on trying to keep the full file path in the url if possible.
Yeah, I'm not convinced either. At least for ABP and NoScript there's a way to manage the whitelist / blacklist. I don't know what the case is for GM or Scriptish. Erik should have a better idea about this.
I also agree that this is a Scriptish/Greasemonkey bug, nor do I see why they should be blocking XMLHttpRequests at all. On the other hand, as they're extremely popular extensions, I think this needs to be dealt with.
(In reply to comment #6) > I also agree that this is a Scriptish/Greasemonkey bug, nor do I see why > they should be blocking XMLHttpRequests at all. I agree with this. Maybe there is something we can do? https://github.com/erikvold/scriptish/blob/master/extension/components/scriptish.js#L268 I'll try to look into it.
It looks like we can use the TYPE_XMLHTTPREQUEST to ignore xhr https://developer.mozilla.org/en/nsIContentPolicy
Scriptish only seems to reject *.user.js for TYPE_DOCUMENT and TYPE_SUBDOCUMENT https://github.com/erikvold/scriptish/blob/master/extension/components/scriptish.js#L285 so I'm confused why it's rejecting a xhr.. I'll test it out later tho.
@Kris is there a extension in the queue that has user.js files that I can test?
This should suffice: https://addons.mozilla.org/en-US/firefox/files/browse/124285/ None of the files in the userscripts directory are accessible.
Forgot about TYPE_XMLHTTPREQUEST. Scriptish v0.1 and master both do not block the .user.js files for me. Kris, can you verify Scriptish is to blame and if it is file a Scriptish issue according to: http://goo.gl/RTsDR The consensus here seems to be that this bug is INVALID... I would suggest resolving it as such.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Reclassifying editor bugs and changing to a new whiteboard flag. Spam, spam, spam, spam...
Whiteboard: [required amo-editors] → [ReviewTeam]
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.