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

Bug 334224

Summary: [client] Validate fields in the "Add User" dialog before sending
Product: [ECD] Orion Reporter: Malgorzata Janczarska <malgorzata.tomczyk>
Component: ClientAssignee: Malgorzata Janczarska <malgorzata.tomczyk>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne, malgorzata.tomczyk, Szymon.Brandys, tomasz.zarna
Version: 0.2   
Target Milestone: 0.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Malgorzata Janczarska CLA 2011-01-13 04:08:16 EST
We could easily validate (not null, same values in both pass fields) fields on the "Add User" dialog before sending them to the server. We could even check if the user with that name is already created while typing, couldn't we?
Comment 1 Tomasz Zarna CLA 2011-01-31 05:37:14 EST
Correct me if I'm wrong, but I guess I've seen that when creating a user we send password twice (as password and as confirmed password). This is not necessary once the password is validated on the client side.
Comment 2 Szymon Brandys CLA 2011-01-31 07:45:00 EST
(In reply to comment #0)
> We could easily validate (not null, same values in both pass fields) fields on
> the "Add User" dialog before sending them to the server. We could even check if
> the user with that name is already created while typing, couldn't we?

Yes, of course. There are things we can validate on the client side. It could prevent unnecessary net traffic. However once "add user" request is sent, we need to repeat the validation on the server side.

(In reply to comment #1)
> Correct me if I'm wrong, but I guess I've seen that when creating a user we
> send password twice (as password and as confirmed password). This is not
> necessary once the password is validated on the client side.

Services like GMail send it twice. I guess they do it to let server double check credentials in case the client failed or did not perform it for some reason.
Comment 3 Malgorzata Janczarska CLA 2011-05-12 07:48:34 EDT
I've added checking for empty login input both for creating user and login. Checking if passwords match was already there.
I'm leaving the idea of checking if user exists while typing as two bandwidth consuming. I don't think it's necessary and it would trigger lots of checks with the server.
Comment 4 Malgorzata Janczarska CLA 2011-05-12 07:50:38 EDT
*** Bug 345299 has been marked as a duplicate of this bug. ***