Skip to content

HTML allowed on any page (XSS) #12

@codeling

Description

@codeling

Looking at this recent commit, I wondered why only links and images should be specially treated for html entities; what specific forms of XSS are prevented by that?

The wiki in its current form allows for HTML to be entered as far as my tests are concerned; entering

<script>alert('Hello');</script>

on a page brings up an alert box...

Doesn't the htmlentities handling need to happen earlier (on $inText at the start of toHTML)? The one happening right before the end of toHTML doesn't do anything ($inText isn't used anymore after that), and would break the previously inserted images/links etc. anyway...

I've tried a fix in my fork: codeling@77cb75d
and it seems to at least prevent the simple XSS shown above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions