fix(auth): sanitize email addresses
Previously, maliciously crafted email addresses could be used to sneak HTML code into the HedgeDoc editor, since HedgeDoc uses the local part of the address as a display name for users. We're now sanitizing this using DOMPurify. Co-authored-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
<small>
|
||||
<span>
|
||||
<% if(lastchangeuserprofile) { %>
|
||||
<span class="ui-lastchangeuser"> <i class="ui-user-icon small" style="background-image: url(<%- lastchangeuserprofile.photo %>);" data-toggle="tooltip" data-placement="right" title="<%- lastchangeuserprofile.name %>"></i></span>
|
||||
<span class="ui-lastchangeuser"> <i class="ui-user-icon small" style="background-image: url(<%- lastchangeuserprofile.photo %>);" data-toggle="tooltip" data-placement="right" title="<%= lastchangeuserprofile.name %>"></i></span>
|
||||
<% } else { %>
|
||||
<span class="ui-no-lastchangeuser"> <i class="fa fa-clock-o fa-fw" style="width: 18px;"></i></span>
|
||||
<% } %>
|
||||
@@ -45,7 +45,7 @@
|
||||
<br>
|
||||
<% if(ownerprofile && owner !== lastchangeuser) { %>
|
||||
<span class="ui-owner">
|
||||
 <i class="ui-user-icon small" style="background-image: url(<%- ownerprofile.photo %>);" data-toggle="tooltip" data-placement="right" title="<%- ownerprofile.name %>"></i>
|
||||
 <i class="ui-user-icon small" style="background-image: url(<%- ownerprofile.photo %>);" data-toggle="tooltip" data-placement="right" title="<%= ownerprofile.name %>"></i>
|
||||
<span class="text-uppercase">owned this note</span>
|
||||
</span>
|
||||
<% } %>
|
||||
|
||||
Reference in New Issue
Block a user