gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: fix payto parsing


From: gnunet
Subject: [libeufin] branch master updated: fix payto parsing
Date: Fri, 08 Apr 2022 23:13:51 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new b5c670ae fix payto parsing
b5c670ae is described below

commit b5c670aebb87d923256cecaeeadefafa8af3d588
Author: ms <ms@taler.net>
AuthorDate: Fri Apr 8 23:12:29 2022 +0200

    fix payto parsing
---
 util/src/main/kotlin/Payto.kt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/util/src/main/kotlin/Payto.kt b/util/src/main/kotlin/Payto.kt
index 459d1c55..f7466787 100644
--- a/util/src/main/kotlin/Payto.kt
+++ b/util/src/main/kotlin/Payto.kt
@@ -61,7 +61,9 @@ fun parsePayto(payto: String): Payto {
     val params: List<Pair<String, String>>? = if (javaParsedUri.query != null) 
{
         val queryString: List<String> = javaParsedUri.query.split("&")
         queryString.map {
-            val split = it.split("="); Pair(split[0], split[1])
+            val split = it.split("=");
+            if (split.size != 2) throw InvalidPaytoError("parameter '$it' was 
malformed")
+            Pair(split[0], split[1])
         }
     } else null
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]