fix security issue Checkmarx
This commit is contained in:
parent
9e4ed72640
commit
cfebca5270
1 changed files with 4 additions and 1 deletions
|
@ -19,6 +19,7 @@ import org.eclipse.swt.widgets.Event;
|
||||||
import org.eclipse.swt.widgets.Text;
|
import org.eclipse.swt.widgets.Text;
|
||||||
|
|
||||||
import ch.ethz.seb.sebserver.gbl.Constants;
|
import ch.ethz.seb.sebserver.gbl.Constants;
|
||||||
|
import ch.ethz.seb.sebserver.gbl.util.Utils;
|
||||||
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
|
import ch.ethz.seb.sebserver.gui.service.i18n.LocTextKey;
|
||||||
import ch.ethz.seb.sebserver.gui.service.page.PageService;
|
import ch.ethz.seb.sebserver.gui.service.page.PageService;
|
||||||
|
|
||||||
|
@ -138,7 +139,9 @@ public class PasswordInput extends Composite {
|
||||||
|
|
||||||
public void setValue(final CharSequence value) {
|
public void setValue(final CharSequence value) {
|
||||||
if (this.passwordInputField != null) {
|
if (this.passwordInputField != null) {
|
||||||
this.passwordInputField.setText(value != null ? value.toString() : StringUtils.EMPTY);
|
this.passwordInputField.setText(value != null
|
||||||
|
? Utils.escapeHTML_XML_EcmaScript(value.toString())
|
||||||
|
: StringUtils.EMPTY);
|
||||||
if (StringUtils.endsWith(value, Constants.IMPORTED_PASSWORD_MARKER)) {
|
if (StringUtils.endsWith(value, Constants.IMPORTED_PASSWORD_MARKER)) {
|
||||||
this.visibilityButton.setEnabled(false);
|
this.visibilityButton.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue