Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
field system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Jan 2009 at 14:23 UTC
Updated:
13 May 2009 at 22:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
andypostSuppose there's no need in check_plain because only developers allowed to edit prefix and suffix
Widget for editing is not escaped by visible by users
Comment #2
andypostcan someone review this patch?
Comment #3
andypostFirst update 7-version then backport
but this issue better move to drupal project
Comment #4
andypostComment #6
yched commentedFixed in CCK.
The answer is of course not to display admin-entered text unfiltered, but to apply consistent filtering - we can be more permissive than a strict check_plain, though.
Attached patch runs prefix and suffix through field_filter_xss()
Comment #7
andypostThanx for patching cck!
Is there a reason to check prefix and suffix if edit them only available for admin (developer)?
Comment #8
yched commentedYes. User with 'administer content types' perm != developer. You don't know what role assignments people use out there. *No* user input goes out unfiltered, that's e general rule.
Note that http://drupal.org/node/372836 specifically advises site admins to grant 'administer content types' perm with care.
Comment #9
andypostPatch applies by hand - but works fine on d7
thanks
Comment #10
bjaspan commentedI don't understand how the patch works for andypost in #9 because it does not actually remove the check_plain call which causes the problem. New patch attached that does. I'll call this "RTBC except I want yched to verify my change."
Comment #11
andypost@bjaspan you right about HEAD - patch #6 with typo, yched just forget to clean check_plain
but as http://drupal.org/cvs?commit=189120 code is same as you provide
Thanks for review
Comment #12
yched commentedRight, I made a mistake while transposing the D6 fix, sorry. #10 is RTBC.
Comment #13
webchickCommitted, thanks!