Project

General

Profile

Bug #67618

Only allow ASCII for email password

Added by Ben Nelson 13 days ago. Updated 6 days 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
48324

Related issues

Copied to FreeNAS - Bug #68079: Test Email fails to sendDone

Associated revisions

Revision f8199d14 (diff)
Added by William Grzybowski 13 days 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 10 days ago

feat(middlewared/mail): only allow ASCII passwords

Ticket: #67618

Revision 03532c5d (diff)
Added by William Grzybowski 10 days 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 10 days ago

feat(middlewared/mail): only allow ASCII passwords

Ticket: #67618

Revision 6463826a (diff)
Added by William Grzybowski 10 days ago

feat(middlewared/mail): only allow ASCII passwords

Ticket: #67618

Revision 6f46e27f (diff)
Added by William Grzybowski 10 days 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 10 days ago

feat(middlewared/mail): only allow ASCII passwords

Ticket: #67618

Revision 2bbc013f (diff)
Added by William Grzybowski 10 days 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 10 days ago

feat(middlewared/mail): only allow ASCII passwords

Ticket: #67618

History

#1 Updated by Ben Nelson 13 days ago

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

#2 Updated by Dru Lavigne 13 days ago

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

#3 Updated by Ben Nelson 13 days ago

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

#4 Updated by Ben Nelson 13 days ago

  • Category changed from OS to Middleware

sorry Dru, I was updating/cleaning my description; I'll reset to Middleware

#5 Updated by William Grzybowski 13 days 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 13 days 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

#7 Updated by William Grzybowski 13 days ago

Ben Nelson wrote:

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

Next week any day (except Tuesday) between 11AM and 2PM UTC should work for me.

#8 Updated by Bug Clerk 13 days ago

  • Status changed from Blocked to In Progress

#9 Updated by Ben Nelson 13 days 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 10 days 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 10 days ago

  • Status changed from In Progress to Ready for Testing

#12 Updated by Bug Clerk 10 days ago

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

#13 Updated by William Grzybowski 10 days ago

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

#14 Updated by Dru Lavigne 9 days ago

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

#15 Updated by Dru Lavigne 9 days 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 7 days 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 7 days ago

  • Needs Doc changed from Yes to No

#18 Updated by Dru Lavigne 6 days ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF