Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requesting feedback on correct interpretation of docs on banlist #6

Open
Download opened this issue Jun 23, 2015 · 4 comments
Open

Comments

@Download
Copy link

jquery-complexify is currently behaving differently from the documentation in respect to loose and strict modes of working with the banlist. We are wondering whether the docs are wrong or the behavior. I'm hoping you will be able to give some feedback as to which is (should be) the correct interpretation.

The discussion is here:
danpalmer/jquery.complexify.js#31

@chickahoona
Copy link
Contributor

Same problem (but easy fix possible)
Change:

            self.inBanlist = function(str) {
                for (var i = 0, c = options.bannedPasswords.length; i < c; i++) {
                    //line with problems incoming:
                    if (options.bannedPasswords[i].indexOf(str) !== -1) {
                        return true;
                    }
                }
                return false;
            };

to

            self.inBanlist = function(str) {
                for (var i = 0, c = options.bannedPasswords.length; i < c; i++) {
                    //fixed line incoming:
                    if (str.indexOf(options.bannedPasswords[i]) !== -1) {
                        return true;
                    }
                }
                return false;
            };

In addition you should update your blacklist, otherwise every password with a '0' drops to 0%, as 0 is on the blacklist ... (someone really hated 0 here :D )

@Download
Copy link
Author

Download commented Dec 6, 2015

I've come to the conclusion that strict mode is unusable for me due to the current behavior.

@Kraku
Copy link
Owner

Kraku commented Dec 7, 2015

Repo is updated to the latest jQuery version. Strict mode is not perfect, I'll try to improve it soon.

@Download
Copy link
Author

Download commented Dec 8, 2015

I have no gripes with angular-complexify, it's the implementation in complexify itself. Actually, the docs describe a very sensible solution, but the actual implementation is sort of 'greedy', matching way more than it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants