Skip to content

Commit

Permalink
Merge pull request #7348 from thunderbird/autoconfig_allow_placeholde…
Browse files Browse the repository at this point in the history
…r_in_domain_element

Allow placeholders in Autoconfig `domain` elements
  • Loading branch information
cketti authored Nov 10, 2023
2 parents 6b976f5 + 513bd2c commit 8f06c24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private class ClientConfigParser(
if (eventType == XmlPullParser.START_TAG) {
when (pullParser.name) {
"domain" -> {
val domain = readText()
val domain = readText().replaceVariables()
if (domain.isValidHostname()) {
domainFound = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class RealAutoconfigParserTest {
@Test
fun `replace variables`() {
val inputStream = minimalConfig.withModifications {
element("domain").text("%EMAILDOMAIN%")
element("incomingServer > hostname").text("%EMAILLOCALPART%.domain.example")
element("outgoingServer > hostname").text("%EMAILLOCALPART%.outgoing.domain.example")
element("outgoingServer > username").text("%EMAILDOMAIN%")
Expand Down

0 comments on commit 8f06c24

Please sign in to comment.