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

Sentry mail without username and password (reset mail settings) #14086

Closed
keros opened this issue Jul 19, 2019 · 8 comments · Fixed by #14557

Comments

@keros
Copy link

commented Jul 19, 2019

Important Details

How are you running Sentry?

Ubuntu 18.04
Installed from pip
Started with systemd

Description

1.) Set mail configuration via gui (smtp, mailserver, username, password, ...).
2.) We need to change to a local Mailserver without authentication (exim4)
3.) Set in /etc/sentry/config.yml the following:

mail.backend: 'smtp'  # Use dummy if you want to disable email entirely
mail.host: 'localhost'
mail.port: 25
mail.username: ''
mail.password: ''
mail.use-tls: false
system.admin-email: 'admin@mydomain.com'

4.) Sent test E-mail -> SMTP AUTH extension not supported by server

The Problem ist that I can not overwrite the username and the passwort that was set previous in the gui with nothing.
If I go to Admin -> Mail I see the old values in username and password, but there should be not set.

I tried to find the "old" values in the database, but can't find anything there.
I also greped in the "/www" folder for this values and find nothing.
Where are this values stored?
How can I reset them to "nothing"?

@BYK

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2019

The Problem ist that I can not overwrite the username and the passwort that was set previous in the gui with nothing.

I think this was an issue with the initial setup wizard in Sentry 9.1.1 which is fixed in 9.1.2 released yesterday. Are you able to try with that?

@BYK BYK self-assigned this Jul 24, 2019

@keros

This comment has been minimized.

Copy link
Author

commented Jul 24, 2019

Thanks for the help

Just updated to 9.1.2 with the same result.
The Webinterface shows me still the old values for username and password.
If I try a test mail the same error comes up (SMTP AUTH extension not supported by server)

@BYK

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2019

Oh wait, my bad for misunderstanding the issue. As far as I know, when you enter a value from the UI, they are persisted in the DB. I'm guessing the UI doesn't allow empty values?

@keros

This comment has been minimized.

Copy link
Author

commented Jul 24, 2019

Hmm I made a DB dump and searched for the values so I can delete them, but I could not find anything.
Does the system maybe store this data not in plaintext?

I have a second sentry installation where I never added username/password for the mailserver config in the web ui. On this system (9.1.1) everything runs fine with the local exim4 noauth config.
So empty values should be ok, but If you fill them one times I can not find out how to get them empty again.

@yydzxz

This comment has been minimized.

Copy link

commented Aug 29, 2019

If you fill them one times I can not find out how to get them empty again.

me too. 😢

@BYK

This comment has been minimized.

Copy link
Contributor

commented Aug 29, 2019

I'll try to get to this but if anyone wants to give it a try, it should not be too complicated and I'm happy to assist them in the process.

BYK added a commit that referenced this issue Sep 2, 2019
fix(OptionsManager): FLAG_PRIORITIZE_DISK should honor empty
Fixes #14086. Right now if the disk value is a falsy value,
`OptionsManager` uses the value from the DB, making it impossible
to override certain values from config files with empty strings or
`0` or similar. This patch adds an explicit `is not None` check
to fix the issue.

WARNING: This may break certain assumptions with default values
         being blank in the config files, allowing UI/DB overrides
         for these. It will certainly need some changes in the
         installWizard to disable the SMTP-related fields.
BYK added a commit that referenced this issue Sep 2, 2019
fix(OptionsManager): FLAG_PRIORITIZE_DISK should honor empty
Fixes #14086. Right now if the disk value is a falsy value,
`OptionsManager` uses the value from the DB, making it impossible
to override certain values from config files with empty strings or
`0` or similar. This patch adds an explicit `is not None` check
to fix the issue.

WARNING: This may break certain assumptions with default values
         being blank in the config files, allowing UI/DB overrides
         for these. It will certainly need some changes in the
         installWizard to disable the SMTP-related fields.

@BYK BYK closed this in #14557 Sep 5, 2019

BYK added a commit that referenced this issue Sep 5, 2019
fix(OptionsManager): FLAG_PRIORITIZE_DISK should honor empty (#14557)
Fixes #14086. Right now if the disk value is a falsy value,
`OptionsManager` uses the value from the DB, making it impossible
to override certain values from config files with empty strings or
`0` or similar. This patch adds an explicit `is not None` check
to fix the issue.

_**⚠️ WARNING:** This may break certain assumptions with default values being blank in the config files, allowing UI/DB overrides for these. It may also need some changes in the installWizard to disable the SMTP-related fields._
@BYK

This comment has been minimized.

Copy link
Contributor

commented Sep 5, 2019

@keros - although this is fixed on master now, I'm not sure if we're gonna do a 9.1.3 release with this patch in soon. :(

@keros

This comment has been minimized.

Copy link
Author

commented Sep 6, 2019

@BYK Thanks for the patch.
I solved the problem with an workaround. So I don't need a fast solution for it.
But its nice that we can overwrite the GUI data now with the config file, even with nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.