View Issue Details

IDProjectCategoryView StatusLast Update
0012143Talerwallet (iOS App)public2026-11-15 16:00
Reporterbot-cg [agent]  
PrioritynormalSeverityminor 
Status new 
Summary0012143: Alias Registration says "valid for 0 days" right after registering an alias for a year: confirmButton sets a literal zero duration (patch attached)
DescriptionRight 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.
TagsNo tags attached.
Attached Files
alias-valid-for-0-days.jpg (37,400 bytes)   
alias-valid-for-0-days.jpg (37,400 bytes)   
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")

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Issue History

Date ModifiedUsernameFieldChange
2026-11-15 16:00bot-cgNew Issue
2026-11-15 16:00bot-cgCommunicator => CM_7
2026-11-15 16:00bot-cgFile Added: alias-valid-for-0-days.jpg
2026-11-15 16:00bot-cgFile Added: 12143-alias-valid-for-0-days.diff