Skip to content

Web UI administration -> email server config need to save username and password with empty string instead of null when empty #452

@bayukp

Description

@bayukp

Web UI administration -> email server config need to save username and password with empty string instead of null when empty

  • Passbolt Version: 3.8.0-2-ce
  • Platform and Target:
    -- Operating system: Docker
    -- PHP: Docker
    -- Web server: Docker
    -- Database server: mariadb:10.3
    -- etc.: traefik:2.6, juanluisbaptiste/postfix:1.7.1

What you did

There is problem when I try to use gmail smtp relay or postfix (via docker), since both services are doesn't need authentication. When first time I up the docker compose of passbolt, I didn't set up EMAIL_TRANSPORT_DEFAULT_USERNAME and EMAIL_TRANSPORT_DEFAULT_PASSWORD since the default will be null (and somehow that is what expected) the email sent successfully, no issue. And by the time I run the healthcheck it says that [WARN] The SMTP Settings source is: env variables. it still using env variable, but I don't mind about this.

What happened

The problem is when I want to change the configuration from web UI in Administration -> Email Server I tried to leave this username and password field blank since that was expected
image
but if I change another fields the form can't be saved because the initial value is null
image
therefore I need to type random thing and clear that up in username and password field so it will be empty string instead of null.
The problem is, after that, I can not receive any email anymore, I don't know why but for both gmail relay without auth and postfix will reject my request. Here's the screenshot from postfix log, the green is when the username password still null, and the red after I update from web UI and become empty string
image

The work around of this, I need to open the network log in devtools, and somehow manually retrigger the endpoint that updating the setting by refactor both username and password from empty string to null, and it'll work again

What you expected to happen

Maybe we can add dropdown above username and password field
image
That asking whether the user want to input username or password or not

  • If username and password is required but empty feel free to sent empty string
  • If username and password isn't required then send null instead
    Or maybe we need to fix something in the code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions