From 160558470b7c783c5fba6247fdbff834169eeb93 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 24 May 2021 10:49:35 -0300 Subject: [PATCH] =?UTF-8?q?a=20veces=20el=20decifrado=20falla=20porque=20e?= =?UTF-8?q?l=20valor=20todav=C3=ADa=20no=20estaba=20cifrado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit buscamos un espacio para saber si se trata de una oraciĆ³n o un mensaje que realmente no se pudo decifrar. fixes #1704 fixes #1706 fixes #1708 fixes #1709 fixes #1710 fixes #1712 fixes #1713 fixes #1714 fixes #1717 fixes #1718 fixes #1719 fixes #1721 fixes #1723 fixes #1724 fixes #1725 fixes #1728 fixes #1779 fixes #1780 fixes #1785 fixes #1799 fixes #1800 fixes #1802 fixes #1803 fixes #1804 fixes #1805 fixes #1807 fixes #1809 fixes #1810 fixes #1811 fixes #1813 --- app/models/metadata_template.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/models/metadata_template.rb b/app/models/metadata_template.rb index 23df8803..cea4d009 100644 --- a/app/models/metadata_template.rb +++ b/app/models/metadata_template.rb @@ -211,9 +211,13 @@ MetadataTemplate = Struct.new(:site, :document, :name, :label, :type, box.decrypt_str value.to_s rescue Lockbox::DecryptionError => e - ExceptionNotifier.notify_exception(e, data: { site: site.name, post: post.path.absolute, name: name }) + if value.to_s.include? ' ' + value + else + ExceptionNotifier.notify_exception(e, data: { site: site.name, post: post.path.absolute, name: name }) - I18n.t('lockbox.help.decryption_error') + I18n.t('lockbox.help.decryption_error') + end end # Cifra el valor.