[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Mathieu Othacehe |
Date: |
Tue, 26 Apr 2022 04:19:48 -0400 (EDT) |
branch: master
commit 1c45ae3c6b7ed9d99b2a1f61d707b40e68c2f7a4
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Tue Apr 26 10:17:35 2022 +0200
http: Decode all URI arguments.
Fixes: <https://issues.guix.gnu.org/55024>.
* src/cuirass/http.scm (body->specification): Decode all arguments and not
only channel URL and build params.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
src/cuirass/http.scm | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm
index e2a95a9..a9fc3ea 100644
--- a/src/cuirass/http.scm
+++ b/src/cuirass/http.scm
@@ -381,7 +381,7 @@ into a specification record and return it."
(lambda (param params)
(match (string-split param #\=)
((key param)
- (cons (cons (string->symbol key) param)
+ (cons (cons (string->symbol key) (uri-decode param))
params))))
'()
(string-split query #\&)))
@@ -399,8 +399,7 @@ into a specification record and return it."
(let ((param (assq-ref params 'param-input)))
(and param
(not (string=? param ""))
- (let ((param (string-split
- (uri-decode param) #\,)))
+ (let ((param (string-split param #\,)))
(cond
((eq? build 'custom)
(map
@@ -411,7 +410,7 @@ into a specification record and return it."
(channels (map (lambda (name url branch)
(channel
(name (string->symbol name))
- (url (uri-decode url))
+ (url url)
(branch branch)))
(filter-field 'channel-name)
(filter-field 'channel-url)