[git] GPGME - branch, master, updated. gpgme-1.11.1-244-g2808625

by Maximilian Krambach cvs at cvs.gnupg.org
Mon Aug 27 13:04:42 CEST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  28086252f15e2c124a2a00c2abc87a815d227fbe (commit)
      from  766d42c248a8c526b831685e93d54db81492f5a8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 28086252f15e2c124a2a00c2abc87a815d227fbe
Author: Maximilian Krambach <maximilian.krambach at intevation.de>
Date:   Mon Aug 27 13:00:50 2018 +0200

    js: make non-payload data more encoding-tolerant
    
    --
    
    * src/Helpers.js: As non-payload data might come in different
      encodings, a conversion has been introduced that worked in most
      cases. Data like the userid might come in different encodings,
      which we don't know of. For now, a try..catch returns the data
      as they are if the utf-8 decoding fails. Sometimes this yields the
      correct result, sometimes it may not work, but it won't stop the
      whole operation anymore.

diff --git a/lang/js/src/Helpers.js b/lang/js/src/Helpers.js
index 9fa5775..aa267f6 100644
--- a/lang/js/src/Helpers.js
+++ b/lang/js/src/Helpers.js
@@ -115,7 +115,14 @@ export function isLongId (value){
  */
 export function decode (property){
     if (typeof property === 'string'){
-        return decodeURIComponent(escape(property));
+        try {
+            return decodeURIComponent(escape(property));
+        }
+        catch (error){
+            if (error instanceof URIError) {
+                return property;
+            }
+        }
     } else if (Array.isArray(property)){
         let res = [];
         for (let arr=0; arr < property.length; arr++){

-----------------------------------------------------------------------

Summary of changes:
 lang/js/src/Helpers.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list