Closed Bug 337184 Opened 20 years ago Closed 20 years ago

Feed Sniffing detects too much content as "feeds" rendering some pages unviewable

Categories

(Firefox Graveyard :: RSS Discovery and Preview, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 2 beta1

People

(Reporter: bugs, Assigned: bugs)

References

()

Details

(Keywords: fixed1.8.1, Whiteboard: [sg:dos])

Attachments

(3 files, 2 obsolete files)

See the test samples in the URI above. Marking as Security-Sensitive.
Attached patch patch (obsolete) — — Splinter Review
Make sure that we only detect substrings as an indicator of feed-ness if that substring was the root "documentElement" of the feed - i.e. wasn't preceded by another tag. This means we need to exclude <? and <! substrings since they are valid in the prologue. (PIs, Doctypes, comments).
Assignee: nobody → bugs
Status: NEW → ASSIGNED
Attachment #221359 - Flags: review?(darin)
Attachment #221359 - Attachment is obsolete: true
Attachment #221363 - Flags: review?(darin)
Attachment #221359 - Flags: review?(darin)
Blocks: 337193
Attachment #221363 - Attachment is obsolete: true
Attachment #221364 - Flags: review?(darin)
Attachment #221363 - Flags: review?(darin)
Attachment #221367 - Attachment mime type: application/rss+xml → text/html
Attachment #221367 - Attachment description: another test case → another test case: commented out multiple signals in prologue
We fail the first test case (multiple signals in comment in the prologue) but pass the second, which IMO is the more important one since it relates to DOSing someone else's site through comment forms (unless someone has for some reason written an app that allows people's comments to be inserted into the prologue)
Comment on attachment 221364 [details] [diff] [review] use FindCharInReadable ok, this should do to fix the immediate issue, though I'm sure darin's suggestions offline will make this better.
Attachment #221364 - Flags: review?(darin)
Attachment #221364 - Flags: review+
Attachment #221364 - Flags: approval-branch-1.8.1+
Post a2 laundry list: 1. make the other test case pass 2. develop further test cases 3. consolidate IsDocumentElement and ContainsTopLevelSubstring into a single function
Whiteboard: [sg:dos]
> 3. consolidate IsDocumentElement and ContainsTopLevelSubstring into a single > function Specifically: right now, we do up-to three passes over the given data trying to detect feeds. that could be reduced to a single pass. just search for '<' characters, and if found, inspect the following character. if it looks like a PI or comment, skip ahead to the next '<'. if that looks like a tag, then compare it against our set of 'feed' tags. done.
fixed-1.8-branch
Priority: -- → P2
Target Milestone: --- → Firefox 2 beta1
Whiteboard: [sg:dos] → [sg:dos][swag:10d]
Flags: blocking-firefox2+
I need to land this on the trunk.
Flags: blocking-firefox2+
Whiteboard: [sg:dos][swag:10d] → [sg:dos][swag:0.5d]
So, I just spent an hour adding back the cached iterators that bug 336755 removed without needing to, and then remembered that everything I was touching was going away with the patch here. Could someone please land this on the trunk, so we can close this bug and then optimize it in an open bug?
Flags: blocking1.8.0.8-
Whiteboard: [sg:dos][swag:0.5d] → [sg:dos] needs trunk landing; post FF1.5
Flags: blocking1.9?
mozilla/browser/components/feeds/src/nsFeedSniffer.cpp 1.12 Is this FIXED now?
Seems FIXED to me: I filed bug 356112 on comment 9, and we actually "pass" attachment 221367 [details] these days, since even if you fool the sniffer, the parser isn't going to return result.doc, so we'll bail and load properly.
Flags: blocking1.9?
Marking FIXED. Reopen if you disagree.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Group: security
Whiteboard: [sg:dos] needs trunk landing; post FF1.5 → [sg:dos]
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: