taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit 5425cab926c11b4c946a3ed54553132bf82b99f8
parent 0e23b4fbc9a9648e49bfa036aec9fa75ca4fbac0
Author: Marc Stibane <marc@taler.net>
Date:   Mon, 24 Aug 2026 15:39:14 +0200

AI: guard scheme

Diffstat:
MTalerWallet1/Views/Transactions/TransactionPayDetailV.swift | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/TalerWallet1/Views/Transactions/TransactionPayDetailV.swift b/TalerWallet1/Views/Transactions/TransactionPayDetailV.swift @@ -51,7 +51,10 @@ struct TransactionPayDetailV: View { .talerFont(.body) if let fulfillmentUrl = info.fulfillmentUrl { - if let destination = URL(string: fulfillmentUrl) { + // per api-common.rst's WebURL definition, fulfillment_url must be http(s) - + // reject any other scheme (tel:, sms:, a third-party app's custom scheme, ...) + if let destination = URL(string: fulfillmentUrl), + let scheme = destination.scheme?.lowercased(), scheme == "http" || scheme == "https" { let buttonTitle = info.fulfillmentMessage ?? String(localized: "Open merchant website") Link(buttonTitle, destination: destination) .buttonStyle(TalerButtonStyle(type: .prominent))