Skip to content

Commit b5bc3c6

Browse files
committed
fix decryption of injected element when no encrypted something defined
1 parent 74b23ab commit b5bc3c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

encryptcontent/decrypt-contents.tpl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ function base64url_decode(input) {
416416
{% if encrypted_something -%}
417417
let encrypted_something = {{ encrypted_something }};
418418
decrypt_somethings(key, encrypted_something);
419+
{%- endif %}
419420
if (typeof inject_something !== 'undefined') {
420421
decrypted_element = {% if webcrypto %}await {% endif %}decrypt_somethings(key, inject_something);
421422
}
@@ -425,7 +426,6 @@ function base64url_decode(input) {
425426
el.remove();
426427
}
427428
}
428-
{%- endif %}
429429

430430
// any post processing on the decrypted content should be done here
431431
{% if arithmatex -%}

0 commit comments

Comments
 (0)