Project

General

Profile

Bug #67618

Only allow ASCII for email password

Added by Ben Nelson 3 months ago. Updated about 1 month ago.

Status:
Done
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

I've had this issue ever since installing my freenas 11.1; I just recently upgraded to 11.1.u6 (which listed an fix for emails), and then latest 11.2, but the same issue occurs.

My SMTP details are correct (I've tested them with regular email client).

When I click Send test email, the following error displays in Freenas UI:

[EFAULT] 'ascii' codec can't encode character '\xe9' in position 37: ordinal not in range(128)

Thanks for any help/assistance on how to get my freenas to send me mails :)

sidenote

When sending this report via Freenas UI's Support (so as to attach debug info), for some reason, the initial password I set for my account was refused and it would say my my login/password were incorrect...

I simplified the password...3 times. So there has to be some limitation on the Freenas side, as Redmine itself was happy with the different passwords (in lowering length & complexity) that I used.

Should I report a bug for that?

fn-email-smtp-error.png (35.9 KB) fn-email-smtp-error.png Timothy Moore II, 01/10/2019 11:36 AM
Screen Shot 2019-02-05 at 11.04.42 AM.png (93.5 KB) Screen Shot 2019-02-05 at 11.04.42 AM.png Bonnie Follweiler, 02/05/2019 08:07 AM
48324
52390

Related issues

Related to FreeNAS - Feature #79770: Update tooltip in new UI to indicate that only ASCII is allowed for email passwordUnscreened
Copied to FreeNAS - Bug #68079: Test Email fails to sendDone
Copied to FreeNAS - Bug #73866: Update tooltip to indicate that only ASCII is allowed for email password Done

Associated revisions

Revision f8199d14 (diff)
Added by William Grzybowski 3 months ago

fix(middlewared/mail): hide mailconfig password

While I'm here also make sure only ValueError is not logged.

Ticket: #67618

Revision e9b2290b (diff)
Added by William Grzybowski 2 months ago

feat(middlewared/mail): only allow ASCII passwords

Ticket: #67618

Revision 03532c5d (diff)
Added by William Grzybowski 2 months ago

fix(middlewared/mail): hide mailconfig password

While I'm here also make sure only ValueError is not logged.

Ticket: #67618

Revision d60b3e11 (diff)
Added by William Grzybowski 2 months ago

feat(middlewared/mail): only allow ASCII passwords

Ticket: #67618

Revision 6463826a (diff)
Added by William Grzybowski 2 months ago

feat(middlewared/mail): only allow ASCII passwords

Ticket: #67618

Revision 6f46e27f (diff)
Added by William Grzybowski 2 months ago

fix(middlewared/mail): hide mailconfig password

While I'm here also make sure only ValueError is not logged.

Ticket: #67618

Revision 37296789 (diff)
Added by William Grzybowski 2 months ago

feat(middlewared/mail): only allow ASCII passwords

Ticket: #67618

Revision 2bbc013f (diff)
Added by William Grzybowski 2 months ago

fix(middlewared/mail): hide mailconfig password

While I'm here also make sure only ValueError is not logged.

Ticket: #67618

Revision 5fad594b (diff)
Added by William Grzybowski 2 months ago

feat(middlewared/mail): only allow ASCII passwords

Ticket: #67618

History

#1 Updated by Ben Nelson 3 months ago

  • File debug-freenas-20190104130254.txz added
  • Private changed from No to Yes

#2 Updated by Dru Lavigne 3 months ago

  • Category changed from OS to Middleware
  • Assignee changed from Release Council to William Grzybowski

#3 Updated by Ben Nelson 3 months ago

  • Description updated (diff)
  • Category changed from Middleware to OS

#5 Updated by William Grzybowski 3 months ago

  • Status changed from Unscreened to Blocked
  • Reason for Blocked set to Need additional information from Author

I am unable to reproduce the issue and I cant find anything useful in the debug.

Are you using non-ascii in anything? Email, names, headers?

Are you available for a TeamViewer session to debug?

#6 Updated by Ben Nelson 3 months ago

Hi William,

I don't have access to my freenas ATM, however, from top of my head, the only odd/special character(s) in the SMTP setup are in the password. I have habit of throwing in sort of the following: à, á, ä, â

Funny, I hadn't thought of checking and changing that earlier -- but now with the issue of Freenas/Support not liking my Redmine password here, and finally working when I "drastically" shortened it & removed any accents.. I'm guessing that maybe the same/similar sort of problem arose.

Otherwise, if it's still not that, yes, should be able to do a teamviewer -- let me know what time/day(s) -- I live in Europe GMT+1

#8 Updated by Bug Clerk 3 months ago

  • Status changed from Blocked to In Progress

#9 Updated by Ben Nelson 2 months ago

Hi William,

I just tested, and the following steps should reproduce the error

Without modifying your SMTP account's actual password, you can put an incorrect password in the FreeNAS UI, Save it, and click to Send test email:

1. incorrect plain ascii password

such as: fr33NAS
returns:

[EAUTH] Authentication error (535): b'5.7.8 Error: authentication failed: authentication failure'

Normal, makes sense

2. incorrect utf8 password

such as: çaalors!
returns:

[EFAULT] 'ascii' codec can't encode character '\xe7' in position 21: ordinal not in range(128)

#10 Updated by William Grzybowski 2 months ago

  • Target version changed from Backlog to 11.2-U2
  • Reason for Blocked deleted (Need additional information from Author)

Thanks, this seems to be an underlying issue in python library, so unfortunately there isnt anything we can do at this moment other than disallow non-ascii passwords

https://github.com/python/cpython/pull/8938

#11 Updated by Bug Clerk 2 months ago

  • Status changed from In Progress to Ready for Testing

#12 Updated by Bug Clerk 2 months ago

  • Copied to Bug #68079: Test Email fails to send added

#13 Updated by William Grzybowski 2 months ago

Acceptance Criteria
Try to use mail password with UTF8 chars, e.g. áúûõ

#14 Updated by Dru Lavigne 2 months ago

  • File deleted (debug-freenas-20190104130254.txz)

#15 Updated by Dru Lavigne 2 months ago

  • Subject changed from Test Email fails to send to Only allow ASCII for email password
  • Private changed from Yes to No
  • Needs Merging changed from Yes to No

#16 Updated by Timothy Moore II 2 months ago

48324

Tested with FreeNAS VM installed with FreeNAS-11.2-INTERNAL63:

Go to System/Email and configure root address with SMTP password containing UTF-8 character "õ". Clicking "Save" returns error message "Only plain text characters (8-bit ASCII) are allowed in passwords. UTF or composed characters are not allowed.".

#17 Updated by Timothy Moore II 2 months ago

  • Needs Doc changed from Yes to No

#18 Updated by Dru Lavigne 2 months ago

  • Status changed from Passed Testing to Done

#19 Updated by Sean McBride about 2 months ago

ASCII is not 8 bit, it is 7 bit. You might want to update the error message...

#20 Updated by Timothy Moore II about 2 months ago

  • Status changed from Done to Ready for Testing

#21 Updated by Dru Lavigne about 2 months ago

  • Status changed from Ready for Testing to In Progress
  • Needs Merging changed from No to Yes

#23 Updated by Dru Lavigne about 2 months ago

  • Status changed from In Progress to Ready for Testing

#25 Updated by Bonnie Follweiler about 1 month ago

52390

This was on FreeNAS-11.2-U2-INTERNAL83. It did give the error message so that passed testing:
EMAIL
[EINVAL] mail-config.pass: Only plain text characters (7-bit ASCII) are allowed in passwords. UTF or composed characters are not allowed.

It failed since the tooltip doesn't mention using the ascii caharcters

#26 Updated by Dru Lavigne about 1 month ago

  • Copied to Bug #73866: Update tooltip to indicate that only ASCII is allowed for email password added

#27 Updated by Dru Lavigne about 1 month ago

  • Status changed from Failed Testing to Done
  • Needs Merging changed from Yes to No

The tooltip will be updated for U3 on the related ticket.

#28 Updated by Dru Lavigne 12 days ago

  • Related to Feature #79770: Update tooltip in new UI to indicate that only ASCII is allowed for email password added

Also available in: Atom PDF