Issue Details (XML | Word | Printable)

Key: MDL-14582
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Dongsheng Cai
Reporter: guy thomas
Votes: 0
Watchers: 5
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Filters 2.0

Created: 28/Apr/08 11:36 PM   Updated: 06/Apr/09 12:06 PM
Return to search
Component/s: Filters
Affects Version/s: 2.0
Fix Version/s: 2.0

File Attachments: 1. Text File filter2.patch (52 kB)
2. Text File MDL-14582_filter_plugins.patch (61 kB)
3. Text File MDL-14582_filters.patch (51 kB)
4. Text File MDL-14582_lib.patch (5 kB)
5. Text File MDL-14582_weblib_filterlib.patch (6 kB)
6. PDF File Moodle Censorship Filter Modification.pdf (87 kB)

Issue Links:
Relates
 

Participants: Dongsheng Cai, Eloy Lafuente (stronk7), guy thomas, Martin Dougiamas and Tim Hunt
Security Level: None
QA Assignee: Eloy Lafuente (stronk7)
Resolved date: 19/Dec/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
1) OOP formats, making them pluggable (this is apart but could be good idea for 2.0)
2) OOP filters
3) Allow each filter to alter the md5key generated, via filter method. filter->hash() will return a unique string, the results for this could be something like, in this example: "censor:seecensoredwords" for users having the capability, or: "censor:" for the rest. Note that adding this info to the hash sounds nice because it automatically invalidates records when filters are changed, and that isn't happening right now.
4) Make the rest of format_text() and format_string() to work as now, but using that "custom" $md5key that contains all the particularities of the text being formatted.

This improvement will help fix this bug:
> Students at our school figured out they could swear if they put the word within a hyperlink - e.g.
> <a href='#'>SwearWord</a>

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Dongsheng Cai made changes - 30/Apr/08 10:04 AM
Field Original Value New Value
Issue Type Bug [ 1 ] Sub-task [ 5 ]
Parent MDL-14610 [ 26179 ]
Dongsheng Cai made changes - 30/Apr/08 11:13 AM
Attachment filter.patch [ 13804 ]
Dongsheng Cai made changes - 30/Apr/08 11:16 AM
Assignee Nobody [ nobody ] Dongsheng Cai [ dongsheng ]
Eloy Lafuente (stronk7) made changes - 02/May/08 09:27 AM
Affects Version/s 1.6.1 [ 10118 ]
Affects Version/s 1.7.1 [ 10151 ]
Affects Version/s 1.6.6 [ 10211 ]
Affects Version/s 1.6.5 [ 10210 ]
Affects Version/s 1.8.2 [ 10220 ]
Affects Version/s 1.6.3 [ 10140 ]
Affects Version/s 1.7.3 [ 10212 ]
Affects Version/s 1.6.4 [ 10150 ]
Affects Version/s 1.7.2 [ 10174 ]
Affects Version/s 1.8.4 [ 10242 ]
Affects Version/s 1.6.2 [ 10119 ]
Affects Version/s 1.8.1 [ 10213 ]
Affects Version/s 1.8.3 [ 10230 ]
Affects Version/s 1.7.4 [ 10243 ]
Affects Version/s 1.8.5 [ 10252 ]
Martin Dougiamas made changes - 07/May/08 10:07 AM
Issue Type Sub-task [ 5 ] Bug [ 1 ]
Parent MDL-14610 [ 26179 ]
Dongsheng Cai made changes - 07/May/08 11:01 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Won't Fix [ 2 ]
Dongsheng Cai made changes - 07/May/08 11:12 AM
Status Resolved [ 5 ] Reopened [ 4 ]
Resolution Won't Fix [ 2 ]
Martin Dougiamas made changes - 07/May/08 01:13 PM
Component/s Filters [ 10077 ]
Component/s Chat [ 10053 ]
Martin Dougiamas made changes - 07/May/08 01:13 PM
Fix Version/s 2.0 [ 10122 ]
Dongsheng Cai made changes - 14/May/08 04:48 PM
Status Reopened [ 4 ] In Progress [ 3 ]
Dongsheng Cai made changes - 21/May/08 12:19 PM
Attachment censor.diff [ 14060 ]
Dongsheng Cai made changes - 22/May/08 05:20 PM
Attachment censor2.diff [ 14070 ]
Dongsheng Cai made changes - 23/May/08 10:51 AM
Attachment censor.diff [ 14060 ]
Dongsheng Cai made changes - 23/May/08 10:51 AM
Attachment censor2.diff [ 14070 ]
Dongsheng Cai made changes - 23/May/08 10:52 AM
Attachment censor.diff [ 14081 ]
Dongsheng Cai made changes - 28/May/08 11:26 AM
Attachment censor.diff [ 14081 ]
Dongsheng Cai made changes - 28/May/08 11:26 AM
Attachment filter.patch [ 13804 ]
Dongsheng Cai made changes - 28/May/08 11:27 AM
Attachment filters.diff [ 14102 ]
Dongsheng Cai made changes - 28/May/08 11:28 AM
Attachment dofilter.diff [ 14103 ]
Dongsheng Cai made changes - 28/May/08 11:33 AM
Summary Censorship filter can be bypassed by enclosing swears in hyperlink OOP Censorship filter
Affects Version/s 2.0 [ 10122 ]
QA Assignee stronk7
Affects Version/s 1.7 [ 10120 ]
Affects Version/s 1.9 [ 10190 ]
Description Students at our school figured out they could swear if they put the word within a hyperlink - e.g.

<a href='#'>SwearWord</a>

I've fixed this and also improved the censorship title so that only admin's can see what the original word was.
Currently the word is blacked out but if you hover over it you can see the swear.
With my mod, hovering over the blacked out swear will show 'censored!' unless you are an admin user.

Obviously, this could be further improved to work from a capability rather than just a legacy check for isadmin()
1) OOP formats, making them pluggable (this is apart but could be good idea for 2.0)
2) OOP filters
3) Allow each filter to alter the md5key generated, via filter method. filter->hash() will return a unique string, the results for this could be something like, in this example: "censor:seecensoredwords" for users having the capability, or: "censor:" for the rest. Note that adding this info to the hash sounds nice because it automatically invalidates records when filters are changed, and that isn't happening right now.
4) Make the rest of format_text() and format_string() to work as now, but using that "custom" $md5key that contains all the particularities of the text being formatted.

This improvement will help fix this bug:
> Students at our school figured out they could swear if they put the word within a hyperlink - e.g.
> <a href='#'>SwearWord</a>
Affects Version/s 1.8 [ 10130 ]
Affects Version/s 1.6 [ 10110 ]
Dongsheng Cai made changes - 17/Jun/08 04:09 PM
Attachment MDL-14582_filters.patch [ 14257 ]
Dongsheng Cai made changes - 17/Jun/08 04:10 PM
Attachment dofilter.diff [ 14103 ]
Dongsheng Cai made changes - 17/Jun/08 04:10 PM
Attachment filters.diff [ 14102 ]
Dongsheng Cai made changes - 17/Jun/08 04:10 PM
Attachment MDL-14582_lib.patch [ 14258 ]
Martin Dougiamas made changes - 11/Dec/08 02:02 PM
Link This issue has a non-specific relationship to MDL-15555 [ MDL-15555 ]
Martin Dougiamas made changes - 11/Dec/08 02:02 PM
Summary OOP Censorship filter Filters 2.0
Martin Dougiamas made changes - 11/Dec/08 02:04 PM
Priority Minor [ 4 ] Major [ 3 ]
Dongsheng Cai made changes - 11/Dec/08 04:34 PM
Attachment MDL-14582_weblib_filterlib.patch [ 15852 ]
Attachment MDL-14582_filter_plugins.patch [ 15853 ]
Dongsheng Cai made changes - 15/Dec/08 12:02 PM
Attachment filter2.patch [ 15883 ]
Dongsheng Cai made changes - 17/Dec/08 11:15 AM
Status In Progress [ 3 ] Open [ 1 ]
Dongsheng Cai made changes - 19/Dec/08 11:19 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]