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.
This commit is contained in:
Vineet K 2023-11-08 10:20:26 -05:00
parent 89c2e2b38e
commit aa816a646e

View File

@ -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)