qba82 Posted November 5, 2019 Report Posted November 5, 2019 Hi, blesta create automatically password for new directadmin accounts, but when it use special characters like < then it don't send full password to user in activation email, for example: blesta created new directadmin account with password: sdaf3<2f245b53 in activation email for user it will show password is: sdaf3 Quote
Tyson Posted November 5, 2019 Report Posted November 5, 2019 If you go to the client's email log and view that email, do you see the full password? Quote
qba82 Posted March 2, 2020 Author Report Posted March 2, 2020 Hi, today another client get wrong password, I just checked Email log, and password was correct there, but client get wrong one, it was cut just after < including < sign. Quote
Tyson Posted March 2, 2020 Report Posted March 2, 2020 It sounds like the problem is that the email they receive is an HTML version, and the password contains a special HTML character, "<", which begins an HTML tag. The HTML renderer takes "<" and everything after until a closing ">" character to represent an HTML tag, and that is not shown as text to the user. If the user views the Text version of the email, however, they should see the password correctly. If you want to resolve the password truncation issue in the HTML version of the email, the password itself should be escaped for HTML. To do so, you will have to update your email template. There is a tag in the email template that represents the password, like "{password}". Change that tag to "{password | escape}". Then, those special characters, like "<", will be displayed correctly and the entire password will be visible. Just set that for the HTML version of the email, not the text version. Quote
qba82 Posted March 14, 2020 Author Report Posted March 14, 2020 What if there is such a tag in email? {service.direct_admin_password} Quote
Jono Posted March 16, 2020 Report Posted March 16, 2020 Then you would do {service.direct_admin_password | escape} I believe. Quote
Paul Posted March 16, 2020 Report Posted March 16, 2020 1 hour ago, Jono said: Then you would do {service.direct_admin_password | escape} I believe. Will this be an issue for everyone using DA? Should this be the recommended tag in the doucmentation? Quote
qba82 Posted May 28, 2020 Author Report Posted May 28, 2020 Hi, I have applied {service.direct_admin_password | escape} tag, but some chars are not showed correctly, for example: & is showed in email as & < is showed in email as < Quote
Jono Posted May 28, 2020 Report Posted May 28, 2020 Keep in mind that you only want to add "| escape}" in the HTML and not the Text version. Is that the case? Quote
qba82 Posted May 29, 2020 Author Report Posted May 29, 2020 Yes I know, I checked without "| escape}" tag, in this case password is cut just before < > or &, but if I use "| escape}" tag, then it is not cut but it is showing & instead & and < instead < Quote
Jono Posted May 29, 2020 Report Posted May 29, 2020 8 hours ago, qba82 said: Yes I know, I checked without "| escape}" tag, in this case password is cut just before < > or &, but if I use "| escape}" tag, then it is not cut but it is showing & instead & and < instead < Sorry, I had a typo in my last answer. I meant to say that you don't want "| escape}" in the text version. Is that the case? Quote
qba82 Posted May 31, 2020 Author Report Posted May 31, 2020 text version is not a problem, I get errors only in html version Quote
Jono Posted June 1, 2020 Report Posted June 1, 2020 I see, I'll try to do some testing and see if I can replicate this and find a cause. Quote
Paul Posted September 18, 2020 Report Posted September 18, 2020 FYI, there's a task for this. CORE-3856 should be resolved in the final release of 4.12.0. Quote
Jono Posted September 22, 2020 Report Posted September 22, 2020 Instead of "| escape}" use "| safe}" Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.