From aa816a646e43e44a43579e45228b28ad4ac92f57 Mon Sep 17 00:00:00 2001 From: vin Date: Wed, 8 Nov 2023 10:20:26 -0500 Subject: [PATCH] fix "LTI signature verification failed" message Some of the form values being sent in the POST request had HTML entities that needed to be unescaped. --- aplus.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aplus.go b/aplus.go index e2ec53b..ae5e054 100644 --- a/aplus.go +++ b/aplus.go @@ -3,6 +3,7 @@ package main import ( "encoding/json" "fmt" + "html" "io" "net/http" "net/url" @@ -41,7 +42,7 @@ func parse_form(form_html string) url.Values { for _, input := range inputs { // Extract field name and value name := extract_attribute(input, "name") - value := extract_attribute(input, "value") + value := html.UnescapeString(extract_attribute(input, "value")) if name != "" { form_values.Add(name, value)