From 41cbf74c4886fdb213f024d8c9d9fe873958349c Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Thu, 21 Apr 2022 13:46:20 +0200 Subject: [PATCH 1/3] Fix typo Thanks-To: Elie Brami --- tuto3.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuto3.yml b/tuto3.yml index 4dbf39e..198dc89 100644 --- a/tuto3.yml +++ b/tuto3.yml @@ -780,7 +780,7 @@ files: - path: /usr/sbin/join-maatma contents: | #!/bin/sh - [ -s "/var/lib/adlin/wireguard/adlin.token" ] && echo "A token is already defined. You'll erase it it you continue." + [ -s "/var/lib/adlin/wireguard/adlin.token" ] && echo "A token is already defined. You'll erase it if you continue." echo -n "Please copy your token here: " read WGTOKEN mkdir -p /var/lib/adlin/wireguard/ From 3613da33cfd6f99fb053bb3ed6771bbf8e4589bd Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Thu, 21 Apr 2022 13:49:37 +0200 Subject: [PATCH 2/3] pkg/unbound: Avoid unquoted var Thanks-To: Elie Brami --- pkg/unbound/docker-entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/unbound/docker-entrypoint.sh b/pkg/unbound/docker-entrypoint.sh index 7db45e9..a358120 100755 --- a/pkg/unbound/docker-entrypoint.sh +++ b/pkg/unbound/docker-entrypoint.sh @@ -2,9 +2,9 @@ set -e -if [ `which unbound-$1 2>/dev/null` ]; then +if [ `which "unbound-$1" 2>/dev/null` ]; then set -- unbound-"$@" -elif [ ! `which $1 2>/dev/null` ]; then +elif [ ! `which "$1" 2>/dev/null` ]; then set -- unbound -dv "$@" fi From 3971ab3f201c713ea1ba6df123b9bf0986365abd Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Thu, 21 Apr 2022 13:50:16 +0200 Subject: [PATCH 3/3] token-validator: Restrict grades API access to owner Thanks-To: Elie Brami --- token-validator/grades.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/token-validator/grades.go b/token-validator/grades.go index c7d9e4d..8d9bf4a 100644 --- a/token-validator/grades.go +++ b/token-validator/grades.go @@ -7,7 +7,7 @@ import ( ) func init() { - router.GET("/api/grades/", apiHandler(computeGrades)) + router.GET("/api/grades/", remoteValidatorHandler(apiHandler(computeGrades))) } func computeGrades(_ httprouter.Params, _ []byte) (interface{}, error) {