fix: post data
This commit is contained in:
parent
553682d74f
commit
19b0a80f57
2
main.go
2
main.go
|
@ -310,7 +310,7 @@ func (srv *server) handleHTTP(rw http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.Method == http.MethodPost {
|
if r.Method == http.MethodPost {
|
||||||
pubkey, _, _, _, err := ssh.ParseAuthorizedKey([]byte(r.FormValue("pub")))
|
pubkey, _, _, _, err := ssh.ParseAuthorizedKey([]byte(r.PostFormValue("pub")))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
rw.WriteHeader(400)
|
rw.WriteHeader(400)
|
||||||
fmt.Fprintln(rw, "ERR READING KEY")
|
fmt.Fprintln(rw, "ERR READING KEY")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user