Skip to content

Commit

Permalink
Fix root generation init not allowing empty input (#5495)
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferai authored Oct 10, 2018
1 parent 320d1b7 commit 55a8837
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion http/sys_generate_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/hex"
"errors"
"fmt"
"io"
"net/http"

"github.com/hashicorp/vault/helper/base62"
Expand Down Expand Up @@ -85,7 +86,7 @@ func handleSysGenerateRootAttemptGet(core *vault.Core, w http.ResponseWriter, r
func handleSysGenerateRootAttemptPut(core *vault.Core, w http.ResponseWriter, r *http.Request, generateStrategy vault.GenerateRootStrategy) {
// Parse the request
var req GenerateRootInitRequest
if err := parseRequest(r, w, &req); err != nil {
if err := parseRequest(r, w, &req); err != nil && err != io.EOF {
respondError(w, http.StatusBadRequest, err)
return
}
Expand Down

0 comments on commit 55a8837

Please sign in to comment.