Clear secure fields before dismissing the webhook and import sheets !187
2 files changed, +8 −0
Layout: unified · split
gitbay/Views/Repos/RepoListView.swift +4
| @@ -201,6 +201,10 @@ struct RepoImportSheet: View { | ||
| 201 | 201 | Task { |
| 202 | 202 | if await model.importRepo( |
| 203 | 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 | 208 | onImported() |
| 205 | 209 | } |
| 206 | 210 | } |
gitbay/Views/Repos/WebhookListView.swift +4
| @@ -142,6 +142,10 @@ private struct WebhookAddSheet: View { | ||
| 142 | 142 | Button("Add") { |
| 143 | 143 | Task { |
| 144 | 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 | 149 | onAdded() |
| 146 | 150 | } |
| 147 | 151 | } |