commit aa816a646e43e44a43579e45228b28ad4ac92f57
parent 89c2e2b38ee57f40217db83fb34e014102b0fb49
Author: vin <git@vineetk.net>
Date: Wed, 8 Nov 2023 10:20:26 -0500
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.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git 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)