Commit 66992b0a31

66992b0a3149645434caa44ffe80e196a2e0015d

parent: 69479fa968

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-16 03:41 UTC

Clear secure fields before dismissing the webhook and import sheets

Closes #49

Layout: unified · split

gitbay/Views/Repos/RepoListView.swift +4
@@ -201,6 +201,10 @@ struct RepoImportSheet: View {
201 Task { 201 Task {
202 if await model.importRepo( 202 if await model.importRepo(
203 path: path, from: from, isPrivate: isPrivate, token: token) != nil { 203 path: path, from: from, isPrivate: isPrivate, token: token) != nil {
204 // A secure field that still holds text as the sheet
205 // goes makes iOS offer to save it as a password.
206 token = ""
207 await Task.yield()
204 onImported() 208 onImported()
205 } 209 }
206 } 210 }
gitbay/Views/Repos/WebhookListView.swift +4
@@ -142,6 +142,10 @@ private struct WebhookAddSheet: View {
142 Button("Add") { 142 Button("Add") {
143 Task { 143 Task {
144 if await model.add(url: url, secret: secret, events: events) { 144 if await model.add(url: url, secret: secret, events: events) {
145 // A secure field that still holds text as the sheet
146 // goes makes iOS offer to save it as a password.
147 secret = ""
148 await Task.yield()
145 onAdded() 149 onAdded()
146 } 150 }
147 } 151 }