> On Sept. 6, 2012, 10:26 p.m., Alex Huang wrote: > > Why not use the apache Base64.isbase64() method instead of a regex match?
Likitha found following about isBase64 method: "I tried using ‘org.apache.commons.codec.binary.Base64.isBase64’ but the only check it performs is if all the characters in the data belongs to the valid character-set." Not the format of the string. But anyways she will be reverting this change to use isBase64, since on more testing with some base64 data it seemed its safer to go with the relaxed check like isbase64 than the regex check. Waiting for her new patch on this. - Prachi ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/6428/#review11142 ----------------------------------------------------------- On Aug. 8, 2012, 9:08 a.m., Likitha Shetty wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/6428/ > ----------------------------------------------------------- > > (Updated Aug. 8, 2012, 9:08 a.m.) > > > Review request for cloudstack and Prachi Damle. > > > Description > ------- > > Error out with InvalidParameterValueException in UserVmManagerImpl if > userdata is not base64 encoded. > > > This addresses bug CS-14796. > > > Diffs > ----- > > server/src/com/cloud/vm/UserVmManager.java 11d2c64 > server/src/com/cloud/vm/UserVmManagerImpl.java f441c72 > > Diff: https://reviews.apache.org/r/6428/diff/ > > > Testing > ------- > > > Thanks, > > Likitha Shetty > >