Repository navigation
feat(domain): parse tel: links and normalise the number to dial - #2
Merged
Merged
Conversation
TelUri reduces an RFC 3966 link to 0-9 * # with an optional leading +, dropping visual separators, the printed "(0)" and all parameters. Since whatever follows ATD is executed by the phone, a link carrying a line break, a semicolon or any other character is refused, as is one longer than 32 digits or 256 characters. DialNumber turns +<home country> into a leading 0, any other + into 00, and prepends the Amtsholung prefix from DialSettings. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Thomas Müller <[email protected]>
On a landline a supplementary-service code such as *21*<number># sets up call forwarding at the exchange. A link carrying one would divert every call to the Feuerwehr's line, behind a confirm window that shows what looks like a number. Links, and the Amtsholung prefix, are now digits only; the attack is replayed in plain and percent-encoded form. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Thomas Müller <[email protected]>
This was referenced Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1, review only the commits after it.
The number in a
tel:link comes from whatever page or document was clicked, and everything afterATDis executed by the phone. SoTelUriis the trust boundary:tel:(scheme case-insensitive,tel://tolerated), percent-decoded, visual separators dropped (- . ( ), space, no-break space,/), printed+49 (0)89handled, parameters (;ext=,;isub=,;phone-context=) kept off the number.+followed by digits. Anything else is refused:*and#(on a landline*21*<number>#sets up call forwarding at the exchange — second commit),%0D%0AATH,%3BATH,\r\n, NUL, letters, a+that is not leading, more than 32 digits, a link over 256 characters (checked before decoding), and a control character in any parameter.DialNumber.Fromturns+<home country>into0…, any other+into00…, and prepends the Amtsholung prefix.DialSettingsvalidates both (country code 1–3 digits without a leading 0, prefix at most 4 digits) andFromthrowsArgumentExceptionon invalid settings.63 tests, written before the code;
make cigreen.🤖 Generated with Claude Code