fix: sanitize server text in pull request messages, auth status and notification watch

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-18 17:19:10 +02:00
1 parent 04ad230d59
commit 3d10badb8b
4 files changed
+9 -5

No files matched your search

+2 -2
View File
@@ -578,7 +578,7 @@ func statusLine(row authStatusRow, d terminal.Display) string {
if row.environment() {
line = "Using GITEA_TOKEN from the environment"
if row.User != "" {
line += " as " + terminal.Emphasis(row.User, d.Color)
line += " as " + terminal.Emphasis(terminal.SafeLine(row.User), d.Color)
}
} else {
line = "Logged in as " + terminal.Emphasis(terminal.SafeLine(row.User), d.Color) + " " + muted("("+credentialLabel(row.account)+")")
@@ -597,7 +597,7 @@ func statusLine(row authStatusRow, d terminal.Display) string {
if row.Verified != nil && *row.Verified {
note := "verified"
if len(row.Scopes) > 0 {
note += ", scopes: " + strings.Join(row.Scopes, ", ")
note += ", scopes: " + terminal.SafeLine(strings.Join(row.Scopes, ", "))
}
notes = append(notes, note)
}