Skip to main content

Questions tagged [bbcode]

BBCode (short for Bulletin Board Code) is a markup language commonly used by forum software.

Filter by
Sorted by
Tagged with
2 votes
0 answers
185 views

Is the PHP BB code extension safe against XSS?

Bad home brew implementations of BB code (especially in PHP) are a common source of XSS vulnerabilities. Usually they rely on a bunch of regexes, a tool that is not fit for the job. But lo and ...
Anders's user avatar
  • 65.7k
0 votes
0 answers
167 views

Custom BBCode preg_replace exploit (patch help needed)

I am having an issue where people are able to exploit my custom BBCode. I am unsure how to patch this up, and was hoping someone here would help me. In the code below, there is a lot more BBCode in ...
UnderMyWheel's user avatar
1 vote
1 answer
462 views

Securely interpret BBCode tags in PHP

I'm trying to make a kind of administratorpanel for my website, so I could e.g. easily add news articles to my website. The problem is that the administrators should be able to use a kind of BBCode, ...
O'Niel's user avatar
  • 3,426
1 vote
1 answer
1k views

How to create a secure BBCode?

Right now, people can use XSS in my URL BBCode, and I don't know how to fix it. I had attempted to fix it a while ago, but someone some how bypassed it! function filterScript($content) { $...
UnderMyWheel's user avatar
1 vote
1 answer
1k views

Using htmlentities() in a BBCode-supporting textarea to stop XSS

I want to have a text area to post stuff to the database with BBCode. So, I downloaded a JavaScript code (to write in the specific BBCode when the image is clicked) but it didn't transform the text. ...
Slim Shady's user avatar
3 votes
2 answers
2k views

Breaking out of attribute in double quotes

I have a piece of code that allows for [url]someurl[/url] BB-Code and replaces it with <a href="someurl">someurl</a> It takes two precautions to prevent XSS. It replaces <, > ...
er4z0r's user avatar
  • 286