Redacts redacted info from all (#112)
This commit is contained in:
parent
cdb86abac1
commit
ed4d903f21
|
@ -188,6 +188,16 @@ func diagnosticsCmdRun(cmd *cobra.Command, args []string) {
|
|||
survey.AskOne(&survey.Confirm{Message: "Upload to " + diagnosticsArgs.HastebinURL + "?", Default: false}, &upload)
|
||||
}
|
||||
if upload {
|
||||
if !diagnosticsArgs.IncludeEndpoints {
|
||||
s := output.String()
|
||||
output.Reset()
|
||||
a := strings.ReplaceAll(cfg.PanelLocation, s, "{redacted}")
|
||||
a = strings.ReplaceAll(cfg.Api.Host, a, "{redacted}")
|
||||
a = strings.ReplaceAll(cfg.Api.Ssl.CertificateFile, a, "{redacted}")
|
||||
a = strings.ReplaceAll(cfg.Api.Ssl.KeyFile, a, "{redacted}")
|
||||
a = strings.ReplaceAll(cfg.System.Sftp.Address, a, "{redacted}")
|
||||
output.WriteString(a)
|
||||
}
|
||||
u, err := uploadToHastebin(diagnosticsArgs.HastebinURL, output.String())
|
||||
if err == nil {
|
||||
fmt.Println("Your report is available here: ", u)
|
||||
|
|
Loading…
Reference in New Issue
Block a user