Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docker] Email validation does not use custom configuration #7897

Closed
jbod opened this issue Sep 4, 2024 · 3 comments
Closed

[Docker] Email validation does not use custom configuration #7897

jbod opened this issue Sep 4, 2024 · 3 comments
Labels

Comments

@jbod
Copy link

jbod commented Sep 4, 2024

Describe the bug

When using pgAdmin4 through the Docker image, the email set in the PGADMIN_DEFAULT_EMAIL variable is validated during the execution of the entrypoint.sh file. However, this does not care about any Python configuration file provided, leading to validation errors whilst setup should allow it.

To Reproduce

Steps to reproduce the behavior:

  1. Create a config_system.py file with the following content, to allow .local email addresses:
    import email_validator email_validator.SPECIAL_USE_DOMAIN_NAMES.remove("local")
  2. Launch the Docker image with the following command:
    docker run -ti --rm -e [email protected] -e PGADMIN_DEFAULT_PASSWORD=admin -e PGADMIN_CONFIG_CHECK_EMAIL_DELIVERABILITY=False -v $(pwd)/config_system.py:/etc/pgadmin/config_system.py dpage/pgadmin4

Expected behavior

The Docker image launches, pgAdmin4 is started and I can use the [email protected] email address to authenticate.

Error message

The Docker image exits with the following message:
'[email protected]' does not appear to be a valid email address. Please reset the PGADMIN_DEFAULT_EMAIL environment variable and try again.

Environment

  • Debian 12.6 on WSL2
  • Docker Desktop 4.33.1
  • pgAdmin4 8.11.0

Additional context

  • Attempting to validate the email address manually using the email_validator Python library works, as long as the content of the config_system.py file is executed before all.
  • The error raised within the entrypoint.sh file is the following:
    email_validator.exceptions_types.EmailSyntaxError: The part after the @-sign is a special-use or reserved name that cannot be used with email.
@jbod jbod added the Bug label Sep 4, 2024
@yogeshmahajan-1903
Copy link
Contributor

@jbod
Email validator can not be changed from config_local.py. You need to provide email in a valid format only.

@jbod
Copy link
Author

jbod commented Sep 5, 2024

Hi @yogeshmahajan-1903

Thanks for your reply.

Does this mean that the config_(local|system).py tip to bypass .local email addresses mentionned in issues #6222, #6504 and #7668 does not work anymore?

@yogeshmahajan-1903
Copy link
Contributor

I marking this as duplicate of #6222

@yogeshmahajan-1903 yogeshmahajan-1903 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants