Closed Bug 607042 Opened 15 years ago Closed 15 years ago

Warning: preg_match() [function.preg-match]: Unknown modifier 'c' in /data/www

Categories

(www.mozilla.org :: General, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stephend, Unassigned)

References

()

Details

(Whiteboard: [redesign])

Attachments

(1 file, 1 obsolete file)

http://nova.stage.mozilla.com/en-US/firefox/all.html?lang-search=%3C%2Fscript%3E%3Cscript%3Ealert%28%22XSS!%22%29%3B%3C%2Fscript%3E&x=22&y=14 yields a bunch of this warning: Warning: preg_match() [function.preg-match]: Unknown modifier 'c' in /data/www/nova.stage.mozilla.com/includes/product-details/firefoxDetails.class.php on line 485
Looks like there was just a typo in the original code. It was supposed to be quoted.
Attachment #485827 - Flags: review?(abuchanan)
Comment on attachment 485827 [details] [diff] [review] patch to quote dynamic regular expression Code change looks fine, but I don't think this fixes the problem. When I tested locally, I still get the error.
Attachment #485827 - Flags: review?(abuchanan) → review-
The delimiter needs to be specified for preg_quote(). Add a second parameter to preg_quote() to fix: $_keywords = preg_quote($keywords, '/');
Can I have a patch please?
second version of patch with one line change, see bug history for details
Attachment #485827 - Attachment is obsolete: true
Attachment #487342 - Flags: review?(abuchanan)
r76715 on trunk.
Comment on attachment 487342 [details] [diff] [review] second version of patch with one line change Thank you.
Attachment #487342 - Flags: review?(abuchanan) → review+
This will be pushed to production with the next update of p-d (usually a product release). I think it can wait until then.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
qa-verified-trunk
Verified FIXED -- pushed to prod, don't see any errors (thought I didn't before, I still don't, obviously).
Status: RESOLVED → VERIFIED
Component: www.mozilla.org/firefox → www.mozilla.org
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: