Skip to content

Allow admins to use basic formatting in welcome message and sanitize output#53

Merged
lmarini merged 2 commits into
developfrom
feature/html-welcome-message
Aug 26, 2020
Merged

Allow admins to use basic formatting in welcome message and sanitize output#53
lmarini merged 2 commits into
developfrom
feature/html-welcome-message

Conversation

@lmarini
Copy link
Copy Markdown
Member

@lmarini lmarini commented Aug 20, 2020

(Fixes #51)

To test you can use this example:

Welcome to <b>Clowder</b>, a <i>scalable</i> data repository where you can share, organize and analyze data.

<h1>A cluster of cats</h1>

<script>alert(‘XSS’)</script>

<image src="https://clowderframework.org/img/cat.png">

<script type=”text/javascript”>
var test=’../example.php?cookie_data=’+escape(document.cookie);
</script>

<b onmouseover=alert(‘XSS testing!‘)></b>

<script>destroyWebsite();</script>

<img src="https://clowderframework.org/img/cat.png" style="width: 100px">

<a href="https://clowderframework.org/">cats</a>

<table style="width:100%">
  <tr>
    <th>Firstname</th>
    <th>Lastname</th>
    <th>Age</th>
  </tr>
  <tr>
    <td>Jill</td>
    <td>Smith</td>
    <td>50</td>
  </tr>
  <tr>
    <td>Eve</td>
    <td>Jackson</td>
    <td>94</td>
  </tr>
</table>

Review Time Estimate

  • Immediately
  • Within one week
  • When possible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the CHANGELOG.md.
  • I have signed the CLA
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@tcnichol
Copy link
Copy Markdown
Contributor

As far as I can tell this one looks good. Marking approved.

@lmarini
Copy link
Copy Markdown
Member Author

lmarini commented Aug 24, 2020

As far as I can tell this one looks good. Marking approved.

For some reason it doesn't show up as approved in the top right.

Copy link
Copy Markdown
Contributor

@tcnichol tcnichol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

marking approved

@max-zilla
Copy link
Copy Markdown
Contributor

Ran it and edited welcome with HTML, looks good.

@lmarini lmarini merged commit 821aa10 into develop Aug 26, 2020
@robkooper robkooper deleted the feature/html-welcome-message branch October 1, 2021 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow admins to use basic formatting in welcome message

3 participants