Skip to content

Commit

Permalink
Add conditional jinja rendering to for clonedsite checks
Browse files Browse the repository at this point in the history
The code to trim the cloned site token for better display was not
encluded in conditionals causing the javascript to fail.
  • Loading branch information
thinkst-francois committed Oct 24, 2023
1 parent e0cdff9 commit 392bcb3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/manage_new.html
Original file line number Diff line number Diff line change
Expand Up @@ -737,11 +737,13 @@ <h6 style="text-align: center;">This token has {% if canarydrop.triggered_detail
temptextArea.innerHTML = ClonedSiteJs;
return temptextArea.value;
}
{% if canarydrop.type == 'clonedsite'%}
// Add cloned-site obfuscated js to textArea
$('#result_cloned_website_obfuscated').append(obfuscateClonedWebJs(decodeClonedSiteJs(`{{canarydrop.get_cloned_site_javascript(force_https)}}`)));
// Trim white spaces from inner HTML
let unobfuscated_cloned_website_js = document.getElementById("result_clonedsite");
unobfuscated_cloned_website_js.innerHTML = unobfuscated_cloned_website_js.innerHTML.trim()
{%endif%}

var displayToken = function(data) {
var type = data['type'];
Expand Down

0 comments on commit 392bcb3

Please sign in to comment.