true == Character.isLetter('中')
false == Character.isUpperCase('中')
false == Character.isLowerCase('中')
false == Character.isTitleCase('中')Practically speaking, I think the password characters should be limited to ISO-646 7-bit character set. Otherwise, Can't guarantee that you can enter on all keyboards. ------- I am Kirby Zhou. I Can not reply on review board now, do not know what happens. 在 2022/3/23, 15:09,“bhavik patel”<[email protected] 代表 [email protected]> 写入: > On March 23, 2022, 6:47 a.m., Kirby Zhou wrote: > > security-admin/src/main/java/org/apache/ranger/common/StringUtil.java > > Line 145 (original), 151 (patched) > > <https://reviews.apache.org/r/73909/diff/1/?file=2266948#file2266948line151> > > > > hasAlpha is no more need > > bhavik patel wrote: > Alpha is required, I have checked the definition for isLetter(): > > "Not all letters have case. Many characters are letters but are neither uppercase nor lowercase nor titlecase." > > Kirby Zhou wrote: > I think isLetter can't deduce (isUpper || isLower), but (isUpper || isLower) can deduce isLetter. > So there is no need to check isLetter. How it will check for special characters which are neither uppercase nor lowercase? - bhavik ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73909/#review224197 ----------------------------------------------------------- On March 22, 2022, 2:29 p.m., bhavik patel wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73909/ > ----------------------------------------------------------- > > (Updated March 22, 2022, 2:29 p.m.) > > > Review request for ranger, Ankita Sinha, Dhaval Rajpara, Dhaval Shah, Dineshkumar Yadav, Gautam Borad, Kirby Zhou, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy. > > > Bugs: RANGER-3678 > https://issues.apache.org/jira/browse/RANGER-3678 > > > Repository: ranger > > > Description > ------- > > Update password validation for "passwordchange" api and changepassword utility. > > > Diffs > ----- > > security-admin/src/main/java/org/apache/ranger/common/StringUtil.java 8debc2403 > security-admin/src/main/java/org/apache/ranger/patch/cliutil/ChangePasswordUtil.java 9f86bf36a > > > Diff: https://reviews.apache.org/r/73909/diff/1/ > > > Testing > ------- > > Verified on local VM's. > > > Thanks, > > bhavik patel > >
