Apply security updates to signature preview
This commit is contained in:
@@ -20,9 +20,14 @@ if (request_headers.query.sanitize) {
|
|||||||
if (data.indexOf("<html>") >= 0) {
|
if (data.indexOf("<html>") >= 0) {
|
||||||
data = wtvshared.sanitizeSignature(data).replace("<html>", `<html><body bgcolor=${message_colors.bgcolor} text=${message_colors.text} link=${message_colors.link} vlink=${message_colors.vlink} vspace=0 hspace=0>`);
|
data = wtvshared.sanitizeSignature(data).replace("<html>", `<html><body bgcolor=${message_colors.bgcolor} text=${message_colors.text} link=${message_colors.link} vlink=${message_colors.vlink} vspace=0 hspace=0>`);
|
||||||
} else {
|
} else {
|
||||||
data = `<body bgcolor=${message_colors.bgcolor} text=${message_colors.text} link=${message_colors.link} vlink=${message_colors.vlink} vspace=0 hspace=0>\n${data}`;
|
data = `<body bgcolor=${message_colors.bgcolor} text=${message_colors.text} link=${message_colors.link} vlink=${message_colors.vlink} vspace=0 hspace=0>\n${wtvshared.sanitizeSignature(data)}`;
|
||||||
|
}
|
||||||
|
if (request_headers.query.showdemotext) {
|
||||||
|
data += `<br>
|
||||||
|
<hr>This is a preview of your signature. The text below the line will not appear in your outgoing messages.
|
||||||
|
It is provided to demonstrate what a message composed with this signature may look like.
|
||||||
|
<a href="client:donothing">This is what a link looks like</a>`;
|
||||||
}
|
}
|
||||||
if (request_headers.query.demotext) data += "<br>" + request_headers.query.demotext;
|
|
||||||
}
|
}
|
||||||
if (!errpage) {
|
if (!errpage) {
|
||||||
headers = `200 OK
|
headers = `200 OK
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ ${(request_headers.query.preview) ? "<tr><td><td colspan=3><b>Signature Preview:
|
|||||||
<tr>
|
<tr>
|
||||||
<TD>
|
<TD>
|
||||||
<td colspan=3 valign=top align=left bgcolor="${(request_headers.query.preview) ? message_colors.bgcolor : "0D0D0D"}">
|
<td colspan=3 valign=top align=left bgcolor="${(request_headers.query.preview) ? message_colors.bgcolor : "0D0D0D"}">
|
||||||
${(request_headers.query.preview) ? `<embed src="wtv-mail:/get-signature?sanitize=true&demotext=${encodeURIComponent(`<hr>This is a preview of your signature. The text below the line will not appear in your outgoing messages. It is provided to demonstrate what a message composed with this signature may look like. <a href="client:donothing">This is what a link looks like</a>.`)}" height=40></embed><br><br>` : ''}
|
${(request_headers.query.preview) ? `<embed src="wtv-mail:/get-signature?sanitize=true&showdemotext=true" height=40></embed><br><br>` : ''}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<td colspan=3 height=2 valign=top align=left>
|
<td colspan=3 height=2 valign=top align=left>
|
||||||
|
|||||||
Reference in New Issue
Block a user