Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341029

Summary: Portal passwd.php Javascript doesn't allow auto-generating random password
Product: Community Reporter: James Blackburn <jamesblackburn+eclipse>
Component: Project Management & PortalAssignee: Portal Bugzilla Dummy Inbox <portal-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: nathan
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description James Blackburn CLA 2011-03-26 06:58:56 EDT
It seems the validation javascript for the password reset page in porta is wrong.  Although there's a checkbox for auto-generate, it's not possible to submit the form with it checked.

Having:

if(document.form1.generate.checked) {
	if(document.form1.Password1.value != "") {
		document.form1.Password1.className = "inputInvalid";
		document.form1.Password2.className = "inputInvalid";
		alert("Cannot auto-generate a password if a new password is supplied. Please type a new password OR check the auto-generate option, but not both.");
		document.form1.Password1.focus();
		return;
	}

} else {
	if((document.form1.Password1.value != document.form1.Password2.value)) {
		document.form1.Password1.className = "inputInvalid";
		document.form1.Password2.className = "inputInvalid";
		alert("Your new passwords do not match.");
		document.form1.Password1.focus();
		return;
	}
	
	
	if(document.form1.Password1.value.length < 6) {
		document.form1.Password1.className = "inputInvalid";
		document.form1.Password2.className = "inputInvalid";
		alert("Your password must be 6 characters or more.");
		document.form1.Password1.focus();
		return;
	}
}

Appears to make the validation work correctly.
Comment 1 James Blackburn CLA 2011-09-26 08:06:38 EDT
This is still an issue.
Comment 2 Wayne Beaton CLA 2013-01-30 22:56:37 EST
Nathan, does site login address this?
Comment 3 Nathan Gervais CLA 2013-01-31 11:24:51 EST
(In reply to comment #2)
> Nathan, does site login address this?

Since we no longer give the user the option to generate a random password on the new system, marking this as WONTFIX