Strip HTML Tags from Q&A comments
See original GitHub issueDescribe the bug
Artemis seems like it is not filtering multiple types of HTML Tags. At least everywhere where markdown is allowed, HTML works almost unrestricted.
To Reproduce
- Go to a page where markdown embedding is allowed (either the instructors’ view or the Q&A Sections)
- Add HTML Style Tags or something similar to your comment
- Save the change
- Reload the page
Expected behavior
The HTML Tags should get removed (at least most of them). Script tags seem to get removed, but I am pretty sure there are ways to exploit this feature and execute JavaScript in the client too.
Ideas I have not tried before: Add an img tag with no src and add JavaScript as an onerror
attribute. If you get this to work, you should be able to do anything. (Edit: attributes seem to also get removed, so this should not be a problem)
Screenshots
The Tutorial Course Page after inserting a style tag into the comments, which flips the whole page.
You are even able to rewrite complete parts of the problem statement.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Remove HTML Tags and Attributes in WordPress Comments
Bu default WordPress comments have instructions for users on how to use HTML tags and attributes in the actual comments, many users are ......
Read more >Strip HTML - Remove HTML Tags - Online
Useful, free online tool that strips HTML tags. No ads, nonsense, or garbage, just an HTML stripper. Press a button – get the...
Read more >Removing HTML Tags using Regexp
To remove HTML tags from any field (e.g. description), follow the steps below: · Select for a field with a Main mapping type...
Read more >Strip HTML from Text JavaScript
The primary advantages of this method are that it is 1) trivial, and 2) will reliably process tags, whitespace, entities, comments, etc. in...
Read more >How to remove html comments using Notepad++ – Emalis
How to remove html comments using Notepad++ ... Select Regular Expression radio button, then leave Replace with empty and there you are. …...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I will keep this updated
Tags that we use in exercise problem statements:
<code>
<pre>
<style>
<detail><summary></summary></detail>
I drafted a PR which will restrict what can be used in student questions and answers, but leave other areas (e.g. exercise problem statements) untouched: #2593