Closed
Bug 37199
Opened 24 years ago
Closed 24 years ago
parser for sherlock plugins misreads 'value' quite badly
Categories
(SeaMonkey :: Search, defect, P3)
SeaMonkey
Search
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: puetzk, Assigned: mozilla)
Details
Attachments
(1 file)
566 bytes,
text/plain
|
Details |
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.14 ppc; en-US; m15) BuildID: I came across this when trying to write a sherlock plugin for bugzilla (which sends fields like showbugs.cgi?...&value0-0-0=word&... Reproducible: Always Steps to Reproduce: The following lines exhibit a fairly severe parser error. <INPUT NAME="string" user> works fine <INPUT NAME="field0-0-0" VALUE="short_desc"> does too <INPUT NAME="value" user> fails, no matter what quoting is used, and does not put itself in the search query the problem is causd by a shortcut taken to parsing on line 3597 of mozilla/xpfe/components/search/src/nsInternetSearchService, which looks like PRInt32 valueOffset = line.Find("value", PR_TRUE); this is not an acceptable way to look for a value="" property, as it trips badly on the beforementioned case where a field is named value, has a property avalue, and many others. This needs to be using a real XML parser I think, as much as a nuisance as that might be to do.
Reporter | ||
Comment 1•24 years ago
|
||
Reporter | ||
Comment 2•24 years ago
|
||
adding rjc on leaf's recommendation.
Assignee | ||
Comment 4•24 years ago
|
||
> This needs to be using a real XML parser...
Ah, if only Sherlock files were XML. :^)
Reporter | ||
Comment 5•24 years ago
|
||
hmm... I guess you're right, they're not quite XML just similar - darn. I was thinking they were. Well then, this is probably going to suck to fix :-( a hack-solution that would help a lot might be to look for whitespace followed by "value" followed by only whitespace followed by '='. That would be far less likely to fail... it would at least make it possible for me to write a bugzilla plugin (which is when I found this).
Assignee | ||
Comment 6•24 years ago
|
||
No cause for concern, this is easy to fix. :^) However, if you want a Sherlock file for Bugzilla, I've already created one... just go to: http://tinderbox.mozilla.org/showbuilds.cgi?tree=SeaMonkey&nocrap=1 and click on the "Bugzilla" link in the "News" section to install it.
Assignee | ||
Comment 7•24 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 8•24 years ago
|
||
puetzk@iastate.edu, does this work for you now?
Updated•16 years ago
|
Product: Core → SeaMonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•