Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: XSS-Bug in HTML::BBCode

by Corion (Pope)
on Aug 14, 2007 at 14:06 UTC ( #632500=note: print w/ replies, xml ) Need Help??


in reply to Re: XSS-Bug in HTML::BBCode
in thread XSS-Bug in HTML::BBCode

I guess that allowing only /^\w+$/ as values is a sane approach at least for the [color] tag. For the other values, you will need to come up with other ways, I suggest restrictive regular expressions there as well. As long as you keep the permissions restrictive in the sense that your REs describe what's allowed instead of describing what's forbidden, you'll be safe(r).

Especially for the [colour] tag, you could also explicitly list the set of allowed colours in your regular expression.


Comment on Re^2: XSS-Bug in HTML::BBCode
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://632500]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2014-12-29 05:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls