Clear secure fields before dismissing the webhook and import sheets !187

merged merged by cmc on 2026-10-16 03:48 UTC · krz/gitbay-ios:clear-secure-fields-before-dismiss into main

2 files changed, +8 −0

Layout: unified · split

gitbay/Views/Repos/RepoListView.swift +4
@@ -201,6 +201,10 @@ struct RepoImportSheet: View {
201201 Task {
202202 if await model.importRepo(
203203 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()
204208 onImported()
205209 }
206210 }
gitbay/Views/Repos/WebhookListView.swift +4
@@ -142,6 +142,10 @@ private struct WebhookAddSheet: View {
142142 Button("Add") {
143143 Task {
144144 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()
145149 onAdded()
146150 }
147151 }