Easy MyCodes
|
|
Author | Message |
If you take a look around, for example, the MyCodes forum at MyBB community, you'll probably notice a number of MyCodes posted there using the "(.*?)" expression. (note, previous statement is true at time of writing)
This particular expression allows almost any input to be placed by the user, which can be dangerous in certain circumstances by potentially allowing various injections. This is perhaps due to the fact that many such "MyCode developers" really don't know how to properly use regular expressions. This plugin aims to make it easier for administrators to write properly sanitised MyCodes which aren't vulnerable to such injections. Instead of writing custom MyCodes in regular expression form, you just enter what you want and place appropriate tokens in the expression. Furthermore, you can actually still use regular expressions in custom MyCodes, so no functionality is actually lost using this plugin (regular expressions need to be escaped however; more information is supplied in the AdminCP when adding/editing MyCodes). To demonstrate an example of an injection, this is what an innocent looking MyCode for allowing custom background colours, might look like: Expression: \[bg=(.*?)\](.*?)\[/bg\] Replacement: <span style="background-color: $1;">$2</span> Perhaps it looks okay, until a user enters something like this in their post: Code:
(This post was last modified: 11-24-2014 10:45 PM by ZiNgA BuRgA.)
|
RateU
Administrator
Posts: 2,350
Joined: Mar 2010 |
|
||
03-17-2010 10:08 AM |
|
ZiNgA BuRgA
|
|
||
03-17-2010 12:06 PM |
|
Imran
|
|
||
04-26-2010 05:52 PM |
|
1master1
Member
Posts: 232
Joined: Oct 2010 |
|
||
11-19-2010 07:55 PM |
|
Imran
|
|
||
11-19-2010 09:35 PM |
|
1master1
Member
Posts: 232
Joined: Oct 2010 |
|
||
11-20-2010 12:27 AM |
|
leefish
|
|
||
11-20-2010 01:21 AM |
|
ZiNgA BuRgA
|
|
||
11-20-2010 07:33 AM |
|
1master1
Member
Posts: 232
Joined: Oct 2010 |
|
||
11-20-2010 07:24 PM |
|
« Next Oldest | Next Newest »
|