Handle base64 decoding correctly to avoid panic (#26483)
Fix the panic if the "base64 secret" is too long.
This commit is contained in:
parent
cafce3b4b5
commit
ed1be4ca68
8 changed files with 43 additions and 30 deletions
|
@ -70,12 +70,12 @@ func runGenerateInternalToken(c *cli.Context) error {
|
|||
}
|
||||
|
||||
func runGenerateLfsJwtSecret(c *cli.Context) error {
|
||||
JWTSecretBase64, err := generate.NewJwtSecretBase64()
|
||||
_, jwtSecretBase64, err := generate.NewJwtSecretBase64()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Printf("%s", JWTSecretBase64)
|
||||
fmt.Printf("%s", jwtSecretBase64)
|
||||
|
||||
if isatty.IsTerminal(os.Stdout.Fd()) {
|
||||
fmt.Printf("\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue