Ticket #6916 (closed Bug: fixed)

Opened 7 years ago

Last modified 5 years ago

Control Panel E-Mail Settings: ESMTP Mail-Password not stored.

Reported by: jensens Owned by: hannosch
Priority: minor Milestone: 3.1.5
Component: Templates/CSS Version:
Keywords: Cc:

Description

I configured the mail sendout at "@@mail-controlpanel" with my SMTP-Server account using my username and password. Plone tried to send out e-mails using the given server, but without authentication.

I repeated the same settings direct at "ZMI -> plone instance -> MailHost" and it used the given auth-data.

Remark: The password field left empty in both, mail-controlpanel and ZMI after trying to set it using the mail-controlpanel. After adding the password in ZMI I had a bunch of stars in the field.

Change History

comment:1 Changed 7 years ago by wichert

  • Owner changed from somebody to hannosch

comment:2 Changed 7 years ago by hannosch

There's probably something wrong with the PasswordWidget here. The one from Zope3 showed the password in clear text by default, so I customized it. I think I have seen some changes in a Zope 3.4.x release that changed the behavior and might have broken my fixes...

comment:3 Changed 7 years ago by hannosch

  • Status changed from new to closed
  • Resolution set to worksforme
  • Component changed from Unknown to Mail
  • Priority changed from critical to major

I tried to verify this but without luck. While there's no visual indicator in the password field in the control panel, it did safe the value just fine. As there's also a browser test for the behavior which works, I assume there's something wrong with your setup. Do you eventually use a non-standard MailHost (i.e. not SecureMailHost)?

comment:4 Changed 7 years ago by jensens

  • Status changed from closed to reopened
  • Resolution worksforme deleted

I tried it again with a recent vanilla Plone 3 checkout.

1) fill in mail.mymailserver.com, keep port 25, mymailusername, mymailuserpassword

2) click save

3) validation error -> e-mail-address was missing

4) fill in e-mail address

5) click save

6) log out

7) use contact-info

8) impossible to send mail out

9) login, ZMI

10) go to MailHost

11) fill in password and click save

12) logout

13) use contact-info

14) mail was sent

comment:5 Changed 7 years ago by hannosch

  • Status changed from reopened to closed
  • Resolution set to invalid

I can reproduce the problem you see with those steps, but this is a simple user error. As with every password field in HTML forms, the one in the mail control panel will not fill in the value when the form validation is not successful.

So when you safe the form the second time, the password field is actually empty, filling in the value again will make it work.

I agree that the field should give you a visual hint about whether or not it has a value filled in, but this is a bug in the standard password formlib widget and thus a Zope3 bug to be filled and fixed there.

comment:6 Changed 7 years ago by jensens

  • Priority changed from major to minor
  • Status changed from closed to reopened
  • Resolution invalid deleted

Ok, I would like bounce that to the UI guy (dont have the permissions here), but I'am able decrease the priority.

1) you fill out a first form page with an invisible required field on the second page. 2) validation fails and the second page is shown, 3) you fill out the required field, but dont see anymore the first page of the form 4) "save" works 5) password value from first form wasnt stored.

I dont think its good behaviour for a system with focus on usability. And I also dont think its a problem with the zope3 widget, more a multi-page-form plone problem. The same will happen file upload fields and so on.

comment:7 Changed 7 years ago by hannosch

  • Status changed from reopened to new
  • Owner hannosch deleted
  • Component changed from Mail to Usability/Accessibility
  • Milestone changed from 3.0 to 3.0.x

Reassign to the usability guys. The simplest fix I could think of is to change the order of the two tabs, so you fill out the email address first and than get a validation error and be moved to the second page should you miss the visual indicator that tells you about the required fields on the second tab.

The second option would be to render both fieldsets on the same page.

comment:8 Changed 6 years ago by csenger

(In [20456]) We need to save username and password in SecureMailHost also in _smtp_userid and _smtp_pass (see #6916).

Do we need some Migration-Code to sync the attributes? The view does not set the userid if doesn't changed so Reentering the password and save the form is not enought.

comment:9 Changed 6 years ago by csenger

There was a bug in the controlpanel-view. I fixed the view in plone 3.1 and leave the ticket for the usabilitiy-team

comment:10 follow-up: ↓ 11 Changed 6 years ago by hannosch

  • Owner set to hannosch

I think the proper fix is to change SMH to only use one of the two attributes here. It seems like the underscore versions are rarely used, so I would remove them.

comment:11 in reply to: ↑ 10 Changed 6 years ago by csenger

Replying to hannosch:

I think the proper fix is to change SMH to only use one of the two attributes here. It seems like the underscore versions are rarely used, so I would remove them.

If SecureMailHost is used outside of Plone it would break code. Making _smtp_pass and _smtp_userid a property and deprecate it could work. But I have no clue how to write proper migration-code for it.

comment:12 Changed 6 years ago by hannosch

  • Status changed from new to closed
  • Resolution set to fixed

(In [21525]) Simplified the mail control panel to present all information on one tab. In case of validation errors the panel behaved in most unintuitive ways. This closes #7425, #7694 and #6916.

comment:13 Changed 5 years ago by hannosch

  • Component changed from Usability to Templates/CSS
Note: See TracTickets for help on using tickets.