Closed dbitouze closed 4 years ago
Denis, what was the URL of the website?
Hi Kim. It was a local URL: http://localhost:8083/Plone/
Products/CMFPlone/browser/login/templates/mail_password_template.pt uses
<tal:i18n
i18n:translate="mailtemplate_tracking_information"
tal:condition="isAnon">
If you didn't expect to receive this email, please ignore it. Your password has not been changed.
Request made from IP address <tal:i18n tal:define="host request/HTTP_X_FORWARDED_FOR|request/REMOTE_ADDR"
tal:content="host"
i18n:name="ipaddress" />
</tal:i18n>
So it uses HTTP_X_FORWARDED_FOR (you should have it behind apache or nginx) or fallback to REMOTE_ADDR if request/HTTP_X_FORWARDED_FOR gives an exception. This probably never happen? Can you try something like this?
<tal:i18n tal:define="host python:request.HTTP_X_FORWARDED_FOR or request.REMOTE_ADDR"
Did you test my suggestion @dbitouze ?
I tested, what I said fix the issue. I have now 127.0.0.1 locally.
@vincentfretin Sorry for not having tested your suggestion. No time for this right now but if you noticed the issue and afterwards fixed it, I guess we can close this issue :)
BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)
What I did:
Create a Plone 5 site, add a user and test the password reset.
What I expect to happen:
The mail sent should contain an IP address at the end of the sentence "Request made from IP address"
What actually happened:
The mail sent doesn't contain the IP address at the end of the sentence "Request made from IP address": it looks like the variable
${ipaddress}
gives nothing.What version of Plone/ Addons I am using: