Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
14.4.3
-
None
-
Unknown
-
Description
In my use-case, I try to manually trigger a job that send a ResetPassword mail.
To do this, I call an internal URL, like `http://internalHostName:8080/xwiki/rest/myEndPoint`.
The email I receive looks like this:
Hello Guillaume Delhumeau,
A password reset was requested for your account (Guillaume Delhumeau) on internalHostName. If you did not make the request, please ignore this message.
In order to reset your password, please follow this link:
[http://internalHostName:8080/xwiki/authenticate/wiki/xwiki/resetpassword?u=[...]
I have managed to fix the link, by changing some properties of the URL factory:
// Use the base URL coming from the wiki descriptor context.getURLFactory().setDefaultURL("xwiki", context.getWiki().getServerURL("xwiki", context));
But I cannot fix the the line
A password reset was requested for your account (Guillaume Delhumeau) on internalHost.
because in the mail template (XWiki.ResetPasswordMailContent), the wiki name is displayed using
$request.serverName
(unless I also modify the template, of course).
What I would expect from XWiki, is to always use the URL set in the wiki descriptor.