Skip to content

Commit

Permalink
fix: Encode userName and correct placeholder for userResetPasswordLink (
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddhanttimeline authored Dec 19, 2024
1 parent 2b6cdea commit fb6cbce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public void sendEmailVerification(UriInfo uriInfo, User user) throws IOException
String.format(
"%s/users/registrationConfirmation?user=%s&token=%s",
getSmtpSettings().getOpenMetadataUrl(),
user.getFullyQualifiedName(),
URLEncoder.encode(user.getFullyQualifiedName(), StandardCharsets.UTF_8),
mailVerificationToken);
try {
EmailUtil.sendEmailVerification(emailVerificationLink, user);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import static org.openmetadata.service.util.email.TemplateConstants.INVITE_RANDOM_PASSWORD_TEMPLATE;
import static org.openmetadata.service.util.email.TemplateConstants.INVITE_SUBJECT;
import static org.openmetadata.service.util.email.TemplateConstants.PASSWORD;
import static org.openmetadata.service.util.email.TemplateConstants.PASSWORD_RESET_LINKKEY;
import static org.openmetadata.service.util.email.TemplateConstants.PASSWORD_RESET_SUBJECT;
import static org.openmetadata.service.util.email.TemplateConstants.REPORT_SUBJECT;
import static org.openmetadata.service.util.email.TemplateConstants.SUPPORT_URL;
Expand Down Expand Up @@ -179,7 +180,7 @@ public static void sendPasswordResetLink(
.add(ENTITY, getSmtpSettings().getEmailingEntity())
.add(SUPPORT_URL, getSmtpSettings().getSupportUrl())
.add(USERNAME, user.getName())
.add(EMAIL_VERIFICATION_LINKKEY, passwordResetLink)
.add(PASSWORD_RESET_LINKKEY, passwordResetLink)
.add(EXPIRATION_TIME_KEY, DEFAULT_EXPIRATION_TIME)
.build();

Expand Down

0 comments on commit fb6cbce

Please sign in to comment.