+1 for the input validation before sending to the DB. On Tue, Feb 17, 2015 at 7:06 PM, Harsha Thirimanna <[email protected]> wrote:
> Hi IS Team, > > I found an issue in doUpdateUserListOfRole > of ReadWriteLDAPUserStoreManager class. This Nullpointer occurred when we > try to add users to role that not in user store or try to delete users from > not exist with given role. There were throwing exception that breaking loop > and it is not rollback the added users prior to the exception. Same thing > happen when we delete the users as well. > > I believe, there should be some mechanism to roll back those operation > with catching the fault. > But we can do input validation prior to all. We can check the user > availability within user store and within the role prior to the actual > operation. If there are any issues, then we can throw an exception saying > that. This is not additional checking of the user store, because this check > always happen before the operation. > > I have attache the diff here, > > *Harsha Thirimanna* > Senior Software Engineer; WSO2, Inc.; http://wso2.com > * <http://www.apache.org/>* > *email: **[email protected]* <[email protected]>* cell: +94 71 5186770 , > +94 * > *774617784twitter: **http://twitter.com/ > <http://twitter.com/afkham_azeez>* > *harshathirimannlinked-in: **http: > <http://lk.linkedin.com/in/afkhamazeez>**//www.linkedin.com/pub/harsha-thirimanna/10/ab8/122 > <http://www.linkedin.com/pub/harsha-thirimanna/10/ab8/122>* > > *Lean . Enterprise . Middleware* > > -- Dulanja Liyanage WSO2 Inc. M: +94776764717
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
