View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012143 | Taler | wallet (iOS App) | public | 2026-11-15 16:00 | 2026-11-15 20:03 |
| Reporter | bot-cg [agent] | ||||
| Implementer | MarcS | ||||
| Priority | normal | Severity | minor | ||
| Status | implementing | ||||
| Target Version | 1.7 | ||||
| Summary | 0012143: Alias Registration says "valid for 0 days" right after registering an alias for a year: confirmButton sets a literal zero duration (patch attached) | ||||
| Description | Right after an alias has been registered for one year and confirmed with the code from the mail, the Alias Registration screen says "This alias, valid for 0 days, is already registered to the mailbox on this phone." (alias-valid-for-0-days.jpg). A user reads that as "it has already expired". Steps (iOS 27.2 simulator): Settings -> Taler Directory -> create a mailbox -> Alias Registration -> enter an e-mail alias -> Lookup Alias -> Register Alias -> type the code from the mail -> Confirm. The registration itself is fine; the app asked for a year: registerAlias{"alias":"talerfuzz+58266@...","duration":{"d_us":31536000000000}, ...} Cause (AliasView.swift, confirmButton): on success the state is set with a literal zero duration, and the text prints it: try await model.completeRegisterAlias(register) lookupState = targetUri.isEmpty ? .unregistered : .confirmed(targetUri, Duration.microseconds(0)) ... Text("This alias, valid for \(validFor.toDays()) days, is already registered ...") Leaving the screen and looking the alias up again shows the real value, because LookupButton takes validFor from the lookupAlias response. Patch attached (alias-valid-for-0-days.diff, not build-verified): pass the validity the view already stores from the registerAlias response (`validFor`) instead of zero. Two things the patch does not cover and which may be worth a look while there: - registerButton sets `.registered(targetUri, Duration.microseconds(0))` in the same way, and AddContactView does it in two places; - when no validity is known at all, the sentence should not print a number of days rather than print 0. Found by the UI fuzz harness, scenario p2p-send-via-mailbox, 2026-11-15. | ||||
| Tags | No tags attached. | ||||
| Attached Files | 12143-alias-valid-for-0-days.diff (808 bytes)
diff --git a/TalerWallet1/Views/TalDir/AliasView.swift b/TalerWallet1/Views/TalDir/AliasView.swift
index c699c843..6e4abb98 100644
--- a/TalerWallet1/Views/TalDir/AliasView.swift
+++ b/TalerWallet1/Views/TalDir/AliasView.swift
@@ -91,7 +91,7 @@ struct AliasView: View {
try await model.completeRegisterAlias(register)
challenge = EMPTYSTRING
lookupState = targetUri.isEmpty ? .unregistered
- : .confirmed(targetUri, Duration.microseconds(0))
+ : .confirmed(targetUri, validFor ?? Duration.microseconds(0))
} catch { // it didn't succeed
// TODO: show error
print("confirm failed")
| ||||
| Correction: the patch first attached (12143-alias-valid-for-0-days.diff) does NOT fix this. I built it and ran the flow: the screen still said "valid for 0 days". It reused the view's `validFor`, which is set from the registerAlias response -- and that response carries no validity here (the directory answers 202 Accepted), so the value is nil. Please ignore that file; I cannot delete it. 12143-alias-valid-for-0-days-v2.diff is the one to look at. It remembers the duration the app itself asked for in registerAlias and uses it when the response has none. Built (BUILD SUCCEEDED, Debug, iOS simulator) and run through the same flow on 2026-11-15: the screen now reads "This alias, valid for 365 days, is already registered to the mailbox on this phone." (alias-valid-365-days-patched.jpg). 12143-alias-valid-for-0-days-v2.diff (1,677 bytes)
diff --git a/TalerWallet1/Views/TalDir/AliasView.swift b/TalerWallet1/Views/TalDir/AliasView.swift
index c699c843..c7207e40 100644
--- a/TalerWallet1/Views/TalDir/AliasView.swift
+++ b/TalerWallet1/Views/TalDir/AliasView.swift
@@ -30,6 +30,7 @@ struct AliasView: View {
@State private var challenge: String = EMPTYSTRING
@State private var aliasTypes: [TaldirAliasType]? = nil
@State private var validFor: Duration? = nil
+ @State private var requestedFor: Duration? = nil // what registerAlias asked for
@State private var addContact: Bool = false
// @ScaledMetric var frameHeight: CGFloat = 40 // relative to fontSize
@@ -61,6 +62,7 @@ struct AliasView: View {
duration: Duration.microseconds(microSeconds))
Task {
do {
+ requestedFor = hasTarget ? nil : Duration.microseconds(microSeconds)
if let result = try await model.registerAlias(register) {
validFor = result
} else {
@@ -91,7 +93,7 @@ struct AliasView: View {
try await model.completeRegisterAlias(register)
challenge = EMPTYSTRING
lookupState = targetUri.isEmpty ? .unregistered
- : .confirmed(targetUri, Duration.microseconds(0))
+ : .confirmed(targetUri, validFor ?? requestedFor ?? Duration.microseconds(0))
} catch { // it didn't succeed
// TODO: show error
print("confirm failed")
| |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-15 16:00 | bot-cg | New Issue | |
| 2026-11-15 16:00 | bot-cg | Communicator | => CM_7 |
| 2026-11-15 16:00 | bot-cg | File Added: alias-valid-for-0-days.jpg | |
| 2026-11-15 16:00 | bot-cg | File Added: 12143-alias-valid-for-0-days.diff | |
| 2026-11-15 16:29 | bot-cg | File Added: 12143-alias-valid-for-0-days-v2.diff | |
| 2026-11-15 16:29 | bot-cg | File Added: alias-valid-365-days-patched.jpg | |
| 2026-11-15 16:29 | bot-cg | Note Added: 0030522 | |
| 2026-11-15 20:03 | Christian Grothoff | Implementer | => MarcS |
| 2026-11-15 20:03 | Christian Grothoff | Reviewer | => schanzen |
| 2026-11-15 20:03 | Christian Grothoff | Release signed by | => MarcS |
| 2026-11-15 20:03 | Christian Grothoff | Deployed by | => MarcS |
| 2026-11-15 20:03 | Christian Grothoff | Verifier | => schanzen |
| 2026-11-15 20:03 | Christian Grothoff | Status | new => implementing |
| 2026-11-15 20:03 | Christian Grothoff | Target Version | => 1.7 |