Skip to content

Commit

Permalink
SAK-49079 Samigo test password does not validate special characters (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
st-manu authored Feb 29, 2024
1 parent 0834919 commit db00981
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public class DeliveryBean implements Serializable {
//SAM-2517
private UserTimeService userTimeService = ComponentManager.get(UserTimeService.class);
private PreferencesService preferencesService = ComponentManager.get(PreferencesService.class);
private FormattedText formattedText = ComponentManager.get(FormattedText.class);

private static final String MATHJAX_SRC_PATH_SAKAI_PROP = "portal.mathjax.src.path";
private static final String MATHJAX_SRC_PATH = ServerConfigurationService.getString(MATHJAX_SRC_PATH_SAKAI_PROP);
Expand Down Expand Up @@ -1284,7 +1285,7 @@ public String validatePassword() {
if (StringUtils.isBlank(password)) {
return "passwordAccessError";
}
if(StringUtils.isNotBlank(getSettings().getPassword()) && !StringUtils.equals(StringUtils.trim(password), StringUtils.trim(getSettings().getPassword()))) {
if(StringUtils.isNotBlank(getSettings().getPassword()) && !StringUtils.equals(StringUtils.trim(password), formattedText.convertFormattedTextToPlaintext(StringUtils.trim(getSettings().getPassword())))) {
return "passwordAccessError";
}

Expand Down Expand Up @@ -1532,7 +1533,7 @@ public void updatEventLog(String errorMsg) {
agentEid= "N/A";
}
eventLogData.setUserEid(agentEid);
eventLogData.setTitle(ComponentManager.get(FormattedText.class).convertFormattedTextToPlaintext(publishedAssessment.getTitle()));
eventLogData.setTitle(formattedText.convertFormattedTextToPlaintext(publishedAssessment.getTitle()));
String site_id= AgentFacade.getCurrentSiteId();
if(site_id == null) {
//take assessment via url
Expand Down

0 comments on commit db00981

Please sign in to comment.