> On Aug. 3, 2018, 8:41 p.m., Abhay Kulkarni wrote: > > agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceValidator.java > > Line 40 (original), 40 (patched) > > <https://reviews.apache.org/r/68186/diff/1/?file=2066984#file2066984line41> > > > > Does the pattern, as specified, need '^' and '$' at the beginning and > > end respectively? Also, this pattern will allow a whitespace character > > anywhere (including as the first character) in service-name. Is this > > intended?
We have removed '^' and '$'. New Regex : [a-zA-Z0-9\s_-]{1,255} We are trimming the string on server side as its already being done on client side. - bhavik ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68186/#review206850 ----------------------------------------------------------- On Aug. 3, 2018, 2:40 p.m., bhavik patel wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/68186/ > ----------------------------------------------------------- > > (Updated Aug. 3, 2018, 2:40 p.m.) > > > Review request for ranger, Ankita Sinha, Gautam Borad, Abhay Kulkarni, Madhan > Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, > and Velmurugan Periasamy. > > > Bugs: RANGER-2181 > https://issues.apache.org/jira/browse/RANGER-2181 > > > Repository: ranger > > > Description > ------- > > Code Improvement To Follow Best Practices. > > > Diffs > ----- > > > agents-common/src/main/java/org/apache/ranger/plugin/errors/ValidationErrorCode.java > 41052dd > > agents-common/src/main/java/org/apache/ranger/plugin/model/validation/RangerServiceValidator.java > 1893fb9 > > agents-common/src/test/java/org/apache/ranger/plugin/model/validation/TestRangerServiceValidator.java > 64ccb7d > security-admin/src/main/webapp/scripts/models/RangerServiceDef.js 9945044 > security-admin/src/main/webapp/styles/xa.css db96ed2 > security-admin/src/main/webapp/templates/helpers/XAHelpers.js 8ace4d7 > > > Diff: https://reviews.apache.org/r/68186/diff/1/ > > > Testing > ------- > > 1. Tested Ranger Admin & Ranger KMS rest calls. > > > Thanks, > > bhavik patel > >