Pavan-Nambi commented on PR #7134:
URL: https://github.com/apache/cloudstack/pull/7134#issuecomment-1750104007

   > > @GutoVeronezi @JoaoJandre , the last time @Pavan-Nambi returned to this 
was in January. Will this be harmful or can it be improved by some small 
changes and merged? cc @shwstppr
   > 
   > @DaanHoogland I think the approach used here could cause some problems, 
especially the possible infinite loop that can be caused by the following block:
   > 
   > ```java
   >     while (!pswd.matches(passwordComplexity)) {
   >          pswd= PasswordGenerator.generateRandomPassword(passwordLength);
   >     }
   > ```
   > 
   > I agree with @JoaoJandre on his comment [#6861 
(comment)](https://github.com/apache/cloudstack/issues/6861#issuecomment-1419337976).
 However, if we go with the feature, we should guide @Pavan-Nambi (if they are 
willing to do it) on a better approach for addressing the use case.
   
   hey can someone tell me if i am thinking this correctly?
   
   as this gonna result in infinite loop , we have to dynamically generate 
password based on regex given by user through parsing it or something 
   which i tired but it ends up failing whenever regex gets bit complex and as 
regex can get really complex i am not sure how to proceed here
   
   on same note i found some already existing java libraries 
[RgXGen](https://github.com/curious-odd-man/RgxGen) and 
[generex](https://github.com/mifmif/Generex)
    which does same but i guess this does for bit more complex passwords too. 
but again i am not sure if its worth it to add a new library here for this.
   
   or if there is a better way to do this , please let me know 
   
   thankyou


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to