Skip to content

BUG: get_params can crash when no username env variables are available #97

@Kruptein

Description

@Kruptein

Describe the bug
Mail cannot be sent from an environment where there is no username environment variable.
This can for example happen in a docker container.

When this environment variable is not set (or some others),
the call to getuser() in get_params will fail and throw an error, resulting in the mail not being sent.

To Reproduce
Steps to reproduce the behavior:

  1. Have an environment where none of the listed getuser() env variables in the python docs are available
  2. Try to send a mail

Expected behavior
The jinja default param for user is not populated or just an empty string.

Additional context
It should also be noted that this happens without any templating being used, even though it seems to be template specific code that crashes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions