Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 12, 2025

Contribution Guidelines

What does this PR include?

Short Description

Stops double-escaping of sender-dependent transport credentials by storing relayhost and transport passwords as entered (no second colon escaping) while keeping the existing single-pass username escape.

Affected Containers

  • none (application PHP code only)

Did you run tests?

What did you tested?

  • php -l data/web/inc/functions.transports.inc.php

What were the final results? (Awaited, got)

  • Awaited: no syntax errors; Got: no syntax errors
Original prompt

This section details on the original issue you should resolve

<issue_title>Special characters in passwords are escaped</issue_title>
<issue_description>### Contribution guidelines

Checklist prior issue creation

  • I understand that failure to follow below instructions may cause this issue to be closed.
  • I understand that vague, incomplete or inaccurate information may cause this issue to be closed.
  • I understand that this form is intended solely for reporting software bugs and not for support-related inquiries.
  • I understand that all responses are voluntary and community-driven, and do not constitute commercial support.
  • I confirm that I have reviewed previous issues to ensure this matter has not already been addressed.
  • I confirm that my environment meets all prerequisite requirements as specified in the official documentation.

Description

This behavior was noticed when entering a new Routing/Sender-dependent transport.

Steps to reproduce:

  1. Fill in the fields under Routing Sender-dependent transports (Host, Username)
  2. Set Password to ]o_Os9C$u<:b^:_
  3. Check password with edit function
  4. The password is as follows ]o_Os9C$u<\\:b^\\:_
  5. If the password is changed in the Edit function, it will be saved correctly.

Logs:

not important

Which branch are you using?

master (stable)

Which architecture are you using?

x86_64

Operating System:

Debian GNU/Linux 13 (trixie)

Server/VM specifications:

6GB, 4 vCPUs

Is Apparmor, SELinux or similar active?

no

Virtualization technology:

ESXi

Docker version:

29.0.2

docker-compose version or docker compose version:

v2.40.3

mailcow version:

2025-10a

Reverse proxy:

not important

Logs of git diff:


Logs of iptables -L -vn:

not important

Logs of ip6tables -L -vn:

not important

Logs of iptables -L -vn -t nat:

not important

Logs of ip6tables -L -vn -t nat:

not important

DNS check:

not important
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fix special characters escaping in passwords Prevent double-escaping of relayhost and transport passwords Dec 12, 2025
Copilot AI requested a review from DerLinkman December 12, 2025 11:20
@DerLinkman
Copy link
Member

@copilot Does this have any negative influence not to escape this anymore?

Copy link
Contributor Author

Copilot AI commented Dec 12, 2025

@copilot Does this have any negative influence not to escape this anymore?

We removed the extra colon escaping only for passwords to stop double-escaping; Postfix accepts literal colons in credentials, so storing them as entered avoids the added backslashes without altering behavior. Username still keeps the single pass escape. Addressed in 4a89078.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants